|
@@ -51,6 +51,62 @@
|
|
|
<version>1.0.0-SNAPSHOT</version>
|
|
|
</dependency>
|
|
|
</dependencies>
|
|
|
-
|
|
|
+ <build>
|
|
|
+ <plugins>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
+ <version>2.1.1.RELEASE</version>
|
|
|
+ <configuration>
|
|
|
+ <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
|
|
+ </configuration>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <goals>
|
|
|
+ <goal>repackage</goal>
|
|
|
+ </goals>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-war-plugin</artifactId>
|
|
|
+ <version>3.1.0</version>
|
|
|
+ <configuration>
|
|
|
+ <failOnMissingWebXml>false</failOnMissingWebXml>
|
|
|
+ <warName>${project.artifactId}</warName>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
|
+ <configuration>
|
|
|
+ <testFailureIgnore>true</testFailureIgnore>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ </plugins>
|
|
|
+ <finalName>${project.artifactId}</finalName>
|
|
|
+ </build>
|
|
|
+ <profiles>
|
|
|
+ <profile>
|
|
|
+ <id>dev</id>
|
|
|
+ <properties>
|
|
|
+ <!-- 环境标识,需要与配置文件的名称相对应 -->
|
|
|
+ <profiles.active>dev</profiles.active>
|
|
|
+ <logging.level>debug</logging.level>
|
|
|
+ </properties>
|
|
|
+ <activation>
|
|
|
+ <!-- 默认环境 -->
|
|
|
+ <activeByDefault>true</activeByDefault>
|
|
|
+ </activation>
|
|
|
+ </profile>
|
|
|
+ <profile>
|
|
|
+ <id>prod</id>
|
|
|
+ <properties>
|
|
|
+ <profiles.active>prod</profiles.active>
|
|
|
+ <logging.level>info</logging.level>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+ </profiles>
|
|
|
|
|
|
</project>
|