天天看点

Failed to execute goal org.springframework.boot错误

        使用SpringBoot父子项目(聚合项目)整合多模块,在pom中打包maven install时总会报错:Failed to execute goal org.springframework.boot:spring-boot-maven-plugin,导致错误的原因是pom.xml中引入了如下配置:
如图:
Failed to execute goal org.springframework.boot错误
        原因是这里引入了spring-boot-maven-plugin,打包的时候会去扫描项目main方法入口,也就是说引入该配置,就必须创建一个Springboot启动类
添加Springboot启动类
去掉pom.xml中的spring-boot-maven-plugin相关配置
修改pom.xml中spring-boot-maven-plugin相关配置为普通的maven--plugin配置即可

继续阅读