You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fesod.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2026/02/21 07:01:44 UTC

Re: [PR] fix: resolve SLF4J and Logback compatibility issues [fesod]

Copilot commented on code in PR #768:
URL: https://github.com/apache/fesod/pull/768#discussion_r2835923265


##########
fesod-examples/fesod-sheet-examples/pom.xml:
##########
@@ -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>

Review Comment:
   This module explicitly uses Logback 1.2.13 which requires SLF4J 1.7.x, but the parent POM now defines slf4j-api.version as 2.0.17 (line 73 in parent pom.xml). This creates a version conflict:
   - Logback 1.2.13 depends on SLF4J 1.7.x
   - Parent POM declares SLF4J 2.0.17
   
   Since this module excludes slf4j-api from spring-boot-starter-web (line 52-54) and relies on the parent's SLF4J version, there will be a runtime incompatibility. Either:
   1. Keep Logback 1.2.13 and explicitly declare slf4j-api 1.7.36 as a dependency in this module, OR
   2. Upgrade to Logback 1.3.14 to match the parent POM's SLF4J 2.0.17 (but note this may conflict with Spring Boot 2.7.18's expectations)
   ```suggestion
           </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>
   ```



##########
fesod-examples/fesod-sheet-examples/pom.xml:
##########
@@ -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 -->

Review Comment:
   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.
   ```suggestion
           <!-- Use Logback 1.2.x; SLF4J version is inherited from the parent POM (currently 2.0.17) -->
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org
For additional commands, e-mail: commits-help@fesod.apache.org