-
Notifications
You must be signed in to change notification settings - Fork 487
fix: resolve SLF4J and Logback compatibility issues #768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -43,6 +43,23 @@ | |||||||||||||||||||
| <groupId>org.springframework.boot</groupId> | ||||||||||||||||||||
| <artifactId>spring-boot-starter-web</artifactId> | ||||||||||||||||||||
| <scope>test</scope> | ||||||||||||||||||||
| <exclusions> | ||||||||||||||||||||
| <exclusion> | ||||||||||||||||||||
| <groupId>org.springframework.boot</groupId> | ||||||||||||||||||||
| <artifactId>spring-boot-starter-logging</artifactId> | ||||||||||||||||||||
| </exclusion> | ||||||||||||||||||||
| <exclusion> | ||||||||||||||||||||
| <groupId>org.slf4j</groupId> | ||||||||||||||||||||
| <artifactId>slf4j-api</artifactId> | ||||||||||||||||||||
| </exclusion> | ||||||||||||||||||||
| </exclusions> | ||||||||||||||||||||
| </dependency> | ||||||||||||||||||||
| <!-- Use Logback 1.2.x with SLF4J 1.7.x for Spring Boot 2.7.x compatibility --> | ||||||||||||||||||||
| <dependency> | ||||||||||||||||||||
| <groupId>ch.qos.logback</groupId> | ||||||||||||||||||||
| <artifactId>logback-classic</artifactId> | ||||||||||||||||||||
| <version>1.2.13</version> | ||||||||||||||||||||
| <scope>test</scope> | ||||||||||||||||||||
| </dependency> | ||||||||||||||||||||
|
||||||||||||||||||||
| </dependency> | |
| </dependency> | |
| <!-- Explicitly use SLF4J 1.7.x to match Logback 1.2.13 and avoid SLF4J 2.0.x from parent --> | |
| <dependency> | |
| <groupId>org.slf4j</groupId> | |
| <artifactId>slf4j-api</artifactId> | |
| <version>1.7.36</version> | |
| <scope>test</scope> | |
| </dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment states "Use Logback 1.2.x with SLF4J 1.7.x for Spring Boot 2.7.x compatibility" but the parent POM (line 73) now declares slf4j-api version 2.0.17, not 1.7.x. Since this module excludes slf4j-api from spring-boot-starter-web and doesn't explicitly declare its own slf4j-api dependency, it will inherit version 2.0.17 from the parent, making the comment inaccurate. Either update the comment to reflect the actual configuration or add an explicit slf4j-api 1.7.36 dependency to match the comment's intent.