pom.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>2.3.1.RELEASE</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>com.caimei</groupId>
  12. <artifactId>caimei365-www</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>www</name>
  15. <description>Demo project for Spring Boot</description>
  16. <properties>
  17. <java.version>1.8</java.version>
  18. <!--maven.build.timestamp保存了maven编译时间戳-->
  19. <timestamp>${maven.build.timestamp}</timestamp>
  20. <!--指定时间格式-->
  21. <maven.build.timestamp.format>yyyyMMdd-HHmmss</maven.build.timestamp.format>
  22. </properties>
  23. <dependencies>
  24. <dependency>
  25. <groupId>org.springframework.boot</groupId>
  26. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  27. </dependency>
  28. <dependency>
  29. <groupId>org.springframework.boot</groupId>
  30. <artifactId>spring-boot-starter-webflux</artifactId>
  31. </dependency>
  32. <dependency>
  33. <groupId>mysql</groupId>
  34. <artifactId>mysql-connector-java</artifactId>
  35. <scope>runtime</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.mybatis.spring.boot</groupId>
  39. <artifactId>mybatis-spring-boot-starter</artifactId>
  40. <version>2.1.1</version>
  41. </dependency>
  42. <!-- redis依赖包 -->
  43. <dependency>
  44. <groupId>org.springframework.boot</groupId>
  45. <artifactId>spring-boot-starter-data-redis</artifactId>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.springframework.boot</groupId>
  49. <artifactId>spring-boot-devtools</artifactId>
  50. <scope>runtime</scope>
  51. <optional>true</optional>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.projectlombok</groupId>
  55. <artifactId>lombok</artifactId>
  56. <optional>true</optional>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.springframework.boot</groupId>
  60. <artifactId>spring-boot-starter-test</artifactId>
  61. <scope>test</scope>
  62. <exclusions>
  63. <exclusion>
  64. <groupId>org.junit.vintage</groupId>
  65. <artifactId>junit-vintage-engine</artifactId>
  66. </exclusion>
  67. </exclusions>
  68. </dependency>
  69. <dependency>
  70. <groupId>io.projectreactor</groupId>
  71. <artifactId>reactor-test</artifactId>
  72. <scope>test</scope>
  73. </dependency>
  74. <dependency>
  75. <groupId>junit</groupId>
  76. <artifactId>junit</artifactId>
  77. <scope>test</scope>
  78. </dependency>
  79. <dependency>
  80. <groupId>com.github.pagehelper</groupId>
  81. <artifactId>pagehelper-spring-boot-starter</artifactId>
  82. <version>1.2.13</version>
  83. </dependency>
  84. <dependency>
  85. <groupId>com.alibaba</groupId>
  86. <artifactId>fastjson</artifactId>
  87. <version>1.2.6</version>
  88. </dependency>
  89. </dependencies>
  90. <profiles>
  91. <profile>
  92. <id>dev</id>
  93. <properties>
  94. <!-- 环境标识,需要与配置文件的名称相对应 -->
  95. <activatedProperties>dev</activatedProperties>
  96. </properties>
  97. <activation>
  98. <!-- 默认环境 -->
  99. <activeByDefault>true</activeByDefault>
  100. </activation>
  101. </profile>
  102. <profile>
  103. <id>beta</id>
  104. <properties>
  105. <activatedProperties>beta</activatedProperties>
  106. </properties>
  107. </profile>
  108. <profile>
  109. <id>prod</id>
  110. <properties>
  111. <activatedProperties>prod</activatedProperties>
  112. </properties>
  113. </profile>
  114. </profiles>
  115. <build>
  116. <resources>
  117. <!-- 配置文件路径 -->
  118. <resource>
  119. <!-- 这里对应项目存放配置文件的目录-->
  120. <directory>src/main/resources</directory>
  121. <!-- 开启filtering功能 -->
  122. <filtering>true</filtering>
  123. </resource>
  124. <resource>
  125. <directory>src/main/resources/config/${activatedProperties}</directory>
  126. <filtering>true</filtering>
  127. </resource>
  128. </resources>
  129. <plugins>
  130. <plugin>
  131. <groupId>org.springframework.boot</groupId>
  132. <artifactId>spring-boot-maven-plugin</artifactId>
  133. <configuration>
  134. <!-- springboot启动类目录 -->
  135. <mainClass>com.caimei.www.WwwApplication</mainClass>
  136. </configuration>
  137. <executions>
  138. <execution>
  139. <goals>
  140. <!-- 创建一个自动可执行的jar或war文件 -->
  141. <goal>repackage</goal>
  142. </goals>
  143. </execution>
  144. </executions>
  145. </plugin>
  146. </plugins>
  147. </build>
  148. </project>