spring-projects-experimental/spring-fu

spring-boot-autoconfigure conflit

lwenxu opened this issue · 1 comments

spring-boot-autoconfigure jar conflit with spring boot 2.5.1

when exlude jar from spring fu

        <dependency>
            <groupId>org.springframework.fu</groupId>
            <artifactId>spring-fu-jafu</artifactId>
            <version>0.4.3</version>
            <exclusions>
                <exclusion>
                    <artifactId>spring-fu-autoconfigure-adapter</artifactId>
                    <groupId>org.springframework.fu</groupId>
                </exclusion>
            </exclusions>
        </dependency>

get class not fuond err

java.lang.NoClassDefFoundError: org/springframework/boot/autoconfigure/web/servlet/StringConverterInitializer
	at org.springframework.fu.jafu.webmvc.WebMvcServerDsl$WebMvcServerConverterDsl.string(WebMvcServerDsl.java:247) ~[spring-fu-jafu-0.4.3.jar:na]
	at com.example.springfudemo.FuApplication.lambda$null$2(FuApplication.java:30) [classes/:na]
	at org.springframework.fu.jafu.webmvc.WebMvcServerDsl$WebMvcServerConverterDsl.initialize(WebMvcServerDsl.java:240) ~[spring-fu-jafu-0.4.3.jar:na]
	at org.springframework.fu.jafu.webmvc.WebMvcServerDsl.converters(WebMvcServerDsl.java:129) ~[spring-fu-jafu-0.4.3.jar:na]
	at com.example.springfudemo.FuApplication.lambda$null$3(FuApplication.java:29) [classes/:na]
	at org.springframework.fu.jafu.webmvc.WebMvcServerDsl.initialize(WebMvcServerDsl.java:145) ~[spring-fu-jafu-0.4.3.jar:na]
	at org.springframework.fu.jafu.webmvc.WebMvcServerDsl.initialize(WebMvcServerDsl.java:48) ~[spring-fu-jafu-0.4.3.jar:na]
	at org.springframework.fu.jafu.AbstractDsl.enable(AbstractDsl.java:57) ~[spring-fu-jafu-0.4.3.jar:na]
	at org.springframework.fu.jafu.ConfigurationDsl.enable(ConfigurationDsl.java:77) ~[spring-fu-jafu-0.4.3.jar:na]
	at com.example.springfudemo.FuApplication.lambda$static$4(FuApplication.java:23) [classes/:na]
	at org.springframework.fu.jafu.ApplicationDsl.initialize(ApplicationDsl.java:27) ~[spring-fu-jafu-0.4.3.jar:na]
	at org.springframework.fu.jafu.ApplicationDsl.initialize(ApplicationDsl.java:15) ~[spring-fu-jafu-0.4.3.jar:na]
	at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:634) ~[spring-boot-2.5.1.jar:2.5.1]
	at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:403) ~[spring-boot-2.5.1.jar:2.5.1]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:337) ~[spring-boot-2.5.1.jar:2.5.1]
	at org.springframework.fu.jafu.JafuApplication.run(JafuApplication.java:98) [spring-fu-jafu-0.4.3.jar:na]
	at org.springframework.fu.jafu.JafuApplication.run(JafuApplication.java:68) [spring-fu-jafu-0.4.3.jar:na]
	at com.example.springfudemo.FuApplication.main(FuApplication.java:37) [classes/:na]
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.autoconfigure.web.servlet.StringConverterInitializer
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_221]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_221]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_221]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_221]
	... 18 common frames omitted

exlude springboot's with same error

why getting start so hard

The latest version released 0.4.4 is designed to be used with Spring Boot 2.4.4. You can use 0.4.5-SNAPSHOT for latest Spring Boot version.