BeanDefinitionStoreException Failed to read candidate component class

后端 未结 8 591
醉梦人生
醉梦人生 2020-12-05 19:20

Can someone tell me how to solve this issue?

I have narrowed down the problem to the pom.xml file. My project works but when I add the following dependency I get an

相关标签:
8条回答
  • 2020-12-05 20:20

    If anyone is still facing this error and is refering the getting started guide from spring.io, not using the defaut package and placing your class files under a new package did the trick for me.

    0 讨论(0)
  • 2020-12-05 20:21

    You most likely have conflicting Spring dependencies on your classpath. It's probably an old spring-asm JAR.

    Run mvn dependency:tree -Dincludes=:spring*:: and check for conflicts. The best way to avoid these is to put a dependency on the spring-framework-bom in your project's dependencyManagement section, as follows

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-framework-bom</artifactId>
                <version>4.0.3.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
    

    These versions are supported.

    0 讨论(0)
提交回复
热议问题