pom.xml 5.1 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>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. </properties>
  19. <dependencies>
  20. <dependency>
  21. <groupId>org.springframework.boot</groupId>
  22. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  23. </dependency>
  24. <dependency>
  25. <groupId>org.springframework.boot</groupId>
  26. <artifactId>spring-boot-starter-webflux</artifactId>
  27. </dependency>
  28. <dependency>
  29. <groupId>mysql</groupId>
  30. <artifactId>mysql-connector-java</artifactId>
  31. <scope>runtime</scope>
  32. </dependency>
  33. <dependency>
  34. <groupId>org.mybatis.spring.boot</groupId>
  35. <artifactId>mybatis-spring-boot-starter</artifactId>
  36. <version>2.1.1</version>
  37. </dependency>
  38. <!-- redis依赖包 -->
  39. <dependency>
  40. <groupId>org.springframework.boot</groupId>
  41. <artifactId>spring-boot-starter-data-redis</artifactId>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.springframework.boot</groupId>
  45. <artifactId>spring-boot-devtools</artifactId>
  46. <scope>runtime</scope>
  47. <optional>true</optional>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.projectlombok</groupId>
  51. <artifactId>lombok</artifactId>
  52. <optional>true</optional>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.springframework.boot</groupId>
  56. <artifactId>spring-boot-starter-test</artifactId>
  57. <scope>test</scope>
  58. <exclusions>
  59. <exclusion>
  60. <groupId>org.junit.vintage</groupId>
  61. <artifactId>junit-vintage-engine</artifactId>
  62. </exclusion>
  63. </exclusions>
  64. </dependency>
  65. <dependency>
  66. <groupId>io.projectreactor</groupId>
  67. <artifactId>reactor-test</artifactId>
  68. <scope>test</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>junit</groupId>
  72. <artifactId>junit</artifactId>
  73. <scope>test</scope>
  74. </dependency>
  75. <!--引入商品模块-->
  76. <dependency>
  77. <groupId>com.caimei.module</groupId>
  78. <artifactId>product</artifactId>
  79. <version>0.0.1-SNAPSHOT</version>
  80. </dependency>
  81. </dependencies>
  82. <profiles>
  83. <profile>
  84. <id>dev</id>
  85. <properties>
  86. <!-- 环境标识,需要与配置文件的名称相对应 -->
  87. <activatedProperties>dev</activatedProperties>
  88. </properties>
  89. <activation>
  90. <!-- 默认环境 -->
  91. <activeByDefault>true</activeByDefault>
  92. </activation>
  93. </profile>
  94. <profile>
  95. <id>beta</id>
  96. <properties>
  97. <activatedProperties>beta</activatedProperties>
  98. </properties>
  99. </profile>
  100. <profile>
  101. <id>prod</id>
  102. <properties>
  103. <activatedProperties>prod</activatedProperties>
  104. </properties>
  105. </profile>
  106. </profiles>
  107. <build>
  108. <resources>
  109. <!-- 配置文件路径 -->
  110. <resource>
  111. <!-- 这里对应项目存放配置文件的目录-->
  112. <directory>src/main/resources</directory>
  113. <!-- 开启filtering功能 -->
  114. <filtering>true</filtering>
  115. </resource>
  116. <resource>
  117. <directory>src/main/resources/config/${activatedProperties}</directory>
  118. <filtering>true</filtering>
  119. </resource>
  120. </resources>
  121. <plugins>
  122. <plugin>
  123. <groupId>org.springframework.boot</groupId>
  124. <artifactId>spring-boot-maven-plugin</artifactId>
  125. <configuration>
  126. <!-- springboot启动类目录 -->
  127. <mainClass>com.caimei.www.WwwApplication</mainClass>
  128. </configuration>
  129. <executions>
  130. <execution>
  131. <goals>
  132. <!-- 创建一个自动可执行的jar或war文件 -->
  133. <goal>repackage</goal>
  134. </goals>
  135. </execution>
  136. </executions>
  137. </plugin>
  138. </plugins>
  139. </build>
  140. </project>