本文介绍: Unable to find main class发现主类。因为打的jar 包不需要主类。这个在外出pom 移动到 主模块中。1、外层pom.xml 2、jarpom.xml 3、主要pom.xml。这个打包插件放在有main 启动模块中。idea 新建maven项目

idea 新建maven项目

1、外层pom.xml    2、jar 包pom.xml 3、主要pom.xml

这个打包插件放在有main 启动模块中
<build>
    <plugins>
        <plugin>
            <groupId&gt;org.springframework.boot</groupId&gt;
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

Unable to find main class  未发现主类。因为打的jar 包不需要主类。这个在外出pom 移动到 主模块中。在进行打包

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注