|
@@ -60,37 +60,98 @@
|
|
<groupId>com.jiayue.cpp</groupId>
|
|
<groupId>com.jiayue.cpp</groupId>
|
|
<artifactId>cpp-generator</artifactId>
|
|
<artifactId>cpp-generator</artifactId>
|
|
</dependency>
|
|
</dependency>
|
|
-
|
|
|
|
|
|
+ <dependency>
|
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
|
+ <artifactId>spring-boot-starter-thymeleaf</artifactId>
|
|
|
|
+ </dependency>
|
|
</dependencies>
|
|
</dependencies>
|
|
|
|
|
|
|
|
+
|
|
<build>
|
|
<build>
|
|
|
|
+ <finalName>cpp</finalName>
|
|
<plugins>
|
|
<plugins>
|
|
|
|
+ <!--跳过test类-->
|
|
<plugin>
|
|
<plugin>
|
|
- <groupId>org.springframework.boot</groupId>
|
|
|
|
- <artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
|
- <version>2.5.15</version>
|
|
|
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
|
|
+ <version>2.21.0</version>
|
|
<configuration>
|
|
<configuration>
|
|
- <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
|
|
|
|
|
+ <skipTests>true</skipTests>
|
|
</configuration>
|
|
</configuration>
|
|
|
|
+ </plugin>
|
|
|
|
+
|
|
|
|
+ <!--资源插件,主要为了从前端项目里复制打包好的文件到springboot项目-->
|
|
|
|
+ <plugin>
|
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
+ <artifactId>maven-resources-plugin</artifactId>
|
|
|
|
+ <version>3.1.0</version>
|
|
<executions>
|
|
<executions>
|
|
<execution>
|
|
<execution>
|
|
|
|
+ <id>copy index</id>
|
|
|
|
+ <phase>generate-resources</phase>
|
|
<goals>
|
|
<goals>
|
|
- <goal>repackage</goal>
|
|
|
|
|
|
+ <goal>copy-resources</goal>
|
|
|
|
+ </goals>
|
|
|
|
+ <configuration>
|
|
|
|
+ <!-- 复制前端打包文件到这里 -->
|
|
|
|
+ <outputDirectory>src/main/resources/templates</outputDirectory>
|
|
|
|
+ <overwrite>true</overwrite>
|
|
|
|
+ <resources>
|
|
|
|
+ <resource>
|
|
|
|
+ <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
|
|
|
|
+ <directory>${project.parent.basedir}/cpp-ui/dist</directory>
|
|
|
|
+ <includes>
|
|
|
|
+ <!-- 具体根据实际前端代码、及目录结构进行配置-->
|
|
|
|
+ <include>index.html</include>
|
|
|
|
+ </includes>
|
|
|
|
+ </resource>
|
|
|
|
+ </resources>
|
|
|
|
+ </configuration>
|
|
|
|
+ </execution>
|
|
|
|
+ <execution>
|
|
|
|
+ <id>copy static</id>
|
|
|
|
+ <phase>generate-resources</phase>
|
|
|
|
+ <goals>
|
|
|
|
+ <goal>copy-resources</goal>
|
|
</goals>
|
|
</goals>
|
|
|
|
+ <configuration>
|
|
|
|
+ <!-- 复制前端打包文件到这里 -->
|
|
|
|
+ <outputDirectory>src/main/resources</outputDirectory>
|
|
|
|
+ <overwrite>true</overwrite>
|
|
|
|
+ <resources>
|
|
|
|
+ <resource>
|
|
|
|
+ <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
|
|
|
|
+ <directory>${project.parent.basedir}/cpp-ui/dist</directory>
|
|
|
|
+ <includes>
|
|
|
|
+ <!-- 具体根据实际前端代码、及目录结构进行配置-->
|
|
|
|
+ <include>static/</include>
|
|
|
|
+ </includes>
|
|
|
|
+ </resource>
|
|
|
|
+ </resources>
|
|
|
|
+ </configuration>
|
|
</execution>
|
|
</execution>
|
|
</executions>
|
|
</executions>
|
|
</plugin>
|
|
</plugin>
|
|
<plugin>
|
|
<plugin>
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
- <artifactId>maven-war-plugin</artifactId>
|
|
|
|
- <version>3.1.0</version>
|
|
|
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
|
+ <artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
|
+ <version>2.1.7.RELEASE</version>
|
|
<configuration>
|
|
<configuration>
|
|
- <failOnMissingWebXml>false</failOnMissingWebXml>
|
|
|
|
- <warName>${project.artifactId}</warName>
|
|
|
|
|
|
+ <!--控制是否启用支持Linux下service方式运行-->
|
|
|
|
+ <executable>true</executable>
|
|
|
|
+ <!--打包后自动运行程序-->
|
|
|
|
+ <!-- <includeSystemScope>true</includeSystemScope>-->
|
|
</configuration>
|
|
</configuration>
|
|
- </plugin>
|
|
|
|
|
|
+ <executions>
|
|
|
|
+ <execution>
|
|
|
|
+ <goals>
|
|
|
|
+ <goal>build-info</goal>
|
|
|
|
+ <goal>repackage</goal>
|
|
|
|
+ </goals>
|
|
|
|
+ </execution>
|
|
|
|
+ </executions>
|
|
|
|
+ </plugin>
|
|
</plugins>
|
|
</plugins>
|
|
- <finalName>${project.artifactId}</finalName>
|
|
|
|
</build>
|
|
</build>
|
|
|
|
|
|
</project>
|
|
</project>
|