1.可能pom.xml
的<packaging>标签
设置的缺省值是pom,
加上<packaging>jar</packaging>
即可2.pom.xml添加如下配置,包含资源文件夹
<build>
<resources>
<resource>
<!--java文件的路径-->
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<!--资源文件的路径-->
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>