springboot问题:Unable to find main class

  • Post author:
  • Post category:其他


springboot 多个maven模块打包异常:Unable to find main class

原因:在父工程中加入了springboot的maven插件,即:

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

此插件会进行repackage:

这里写图片描述

util这个模块只是一个普通的maven模块,但是由于父工程引用了springboot的maven插件,所以进行了repackage。

参考资料:

https://my.oschina.net/tridays/blog/825245



版权声明:本文为jm19920911原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。