jar运行报错no main manifest attribute
解决
排查之后发现是maven项目中的pom.xml没有加
<packaging>jar</packaging>
以及如下的配置:
<build>
<!--maven的打包插件-->
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
<!-- pom.xml中加入resources配置 -->
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<!-- 项目打包时会将java目录中的*.xml文件也进行打包 -->
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>