主要原因:

是因为自己定制的starter在打包时(package)用了spring-boot-maven-plugin,即在你的定制starter工程的pom.xml中有如下配置:

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
</build>

这样打出的包,就是按着spring boot的打包方式设定classpath,相对目录,资源目录等。

Failed to process import candidates for configuration class [com.simple.....]

当你用另一个spring boot项目使用这个定制的starter的jar包时。就会有问题 ,因为认为你这个starter是一个普通的jar包。

这样就无法找到你的类定义

 

解决办法:

删除自定义starter中的pom.xml中的打包插件设置,采用缺省的jar打包方式。即可解决这个问题

Failed to process import candidates for configuration class [com.simple.....]

 

相关文章:

  • 2021-10-19
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2021-05-28
  • 2021-07-12
  • 2021-09-04
猜你喜欢
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
  • 2021-12-08
相关资源
相似解决方案