spring boot maven插件不包括源文件夹中的所有文件

时间:2022-04-23 11:13:37

I have a Spring boot project with below structure. But it is not including ui and static folder. below is the snippet of pom.xml plugin. How to include these folders and it's content.

我有一个具有以下结构的Spring启动项目。但它不包括ui和静态文件夹。下面是pom.xml插件的片段。如何包含这些文件夹及其内容。

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.6.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
</parent>
<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
</build>

Below is the project strucutre

以下是项目结构

spring boot maven插件不包括源文件夹中的所有文件

1 个解决方案

#1


0  

Changing packaging from jar to war solved the problem.

将包装从罐子改为战争解决了这个问题。

<!-- <packaging>jar</packaging> -->
    <packaging>war</packaging>

#1


0  

Changing packaging from jar to war solved the problem.

将包装从罐子改为战争解决了这个问题。

<!-- <packaging>jar</packaging> -->
    <packaging>war</packaging>