Open mpscheidt opened 2 years ago
Hi Markus
Thanks for pointing this out. I agree that we should depend only on the interfaces, we will fix that in the next major release as it could be a braking change for existing users . Meanwhile I also recommend workaround which You suggested to exclude slf4j-simple
Thanks
Given a simple Spring Boot project created with https://start.spring.io/, running tests with
gradlew test
works fine:But adding the dependency on
spring-rest2ts-generator
implementation group: 'com.blue-veery', name: 'spring-rest2ts-generator', version: '1.3.0'
breaks the test run, complaining about duplicate implementations of slf4j implementation on the classpath:
spring-rest2ts-generator
)This is the error produced by
gradlew test
:LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.SimpleLoggerFactory loaded from file:/D:/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.32/321ffafb5123a91a71737dbff38ebe273e771e5b/slf4j-simple-1.7.32.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.impl.SimpleLoggerFactory
Suggestion: Remove
spring-rest2ts-generator
's dependency onslf4j-simple
. The choice for a particular logging implemenetation should be decided by the project in whichspring-rest2ts-generator
is being used.Btw, the workaround to get going with Spring Boot is to exclude the dependency: