SpringBoot Unable to find main class问题

1,去掉springboot的maven插件

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

此插件会进行repackage

2, configuration下配置mainClass,指定程序入口

<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<mainClass>com.pn.pn_image.PnImageApplication</mainClass>
				</configuration>
			</plugin>
上一篇:IDEA : Unable to save settings: Failed to save settings. Please restart IntelliJ IDEA解决办法


下一篇:【转载】springboot启动报错(Unable to start web server; nested exception is org.springframework.context.Appli