pom.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>cn.aiyangniu</groupId>
  5. <artifactId>provider-service</artifactId>
  6. <version>1.0.0</version>
  7. <properties>
  8. <maven.compiler.source>8</maven.compiler.source>
  9. <maven.compiler.target>8</maven.compiler.target>
  10. </properties>
  11. <!-- 继承SpringBoot父项目 -->
  12. <parent>
  13. <groupId>org.springframework.boot</groupId>
  14. <artifactId>spring-boot-starter-parent</artifactId>
  15. <version>2.7.5</version>
  16. </parent>
  17. <dependencies>
  18. <!-- 导入starter-web项目 -->
  19. <dependency>
  20. <groupId>org.springframework.boot</groupId>
  21. <artifactId>spring-boot-starter-web</artifactId>
  22. <exclusions>
  23. <exclusion>
  24. <groupId>org.springframework.boot</groupId>
  25. <artifactId>spring-boot-starter-tomcat</artifactId>
  26. </exclusion>
  27. </exclusions>
  28. </dependency>
  29. <dependency>
  30. <groupId>org.springframework.boot</groupId>
  31. <artifactId>spring-boot-starter-undertow</artifactId>
  32. </dependency>
  33. <!-- 导入单元测试的包 -->
  34. <dependency>
  35. <groupId>org.springframework.boot</groupId>
  36. <artifactId>spring-boot-starter-test</artifactId>
  37. <scope>test</scope>
  38. </dependency>
  39. <!-- 导入druid包,配置druid配置 -->
  40. <dependency>
  41. <groupId>com.alibaba</groupId>
  42. <artifactId>druid</artifactId>
  43. <version>1.2.14</version>
  44. </dependency>
  45. <dependency>
  46. <groupId>com.alibaba</groupId>
  47. <artifactId>druid-spring-boot-starter</artifactId>
  48. <version>1.2.14</version>
  49. </dependency>
  50. <!-- 导入Mybatis Plus包 -->
  51. <dependency>
  52. <groupId>com.baomidou</groupId>
  53. <artifactId>mybatis-plus-boot-starter</artifactId>
  54. <version>3.5.2</version>
  55. </dependency>
  56. <!-- 导入MySQL工具包 -->
  57. <dependency>
  58. <groupId>mysql</groupId>
  59. <artifactId>mysql-connector-java</artifactId>
  60. <version>8.0.31</version>
  61. </dependency>
  62. <dependency>
  63. <groupId>org.springframework.boot</groupId>
  64. <artifactId>spring-boot-starter-data-redis</artifactId>
  65. <version>2.7.5</version>
  66. </dependency>
  67. <!-- 导入FastJson工具包 -->
  68. <dependency>
  69. <groupId>com.alibaba</groupId>
  70. <artifactId>fastjson</artifactId>
  71. <version>2.0.17</version>
  72. </dependency>
  73. <!-- 导入pinyin4j工具包 -->
  74. <dependency>
  75. <groupId>com.belerweb</groupId>
  76. <artifactId>pinyin4j</artifactId>
  77. <version>2.5.1</version>
  78. </dependency>
  79. <!-- 导入getter/setter方法自动加载的包 -->
  80. <dependency>
  81. <groupId>org.projectlombok</groupId>
  82. <artifactId>lombok</artifactId>
  83. <version>1.18.24</version>
  84. </dependency>
  85. <!-- 导入通用上传commons-fileupload工具包 -->
  86. <dependency>
  87. <groupId>commons-fileupload</groupId>
  88. <artifactId>commons-fileupload</artifactId>
  89. <version>1.4</version>
  90. </dependency>
  91. <!-- 导入commons-io工具包 -->
  92. <dependency>
  93. <groupId>commons-io</groupId>
  94. <artifactId>commons-io</artifactId>
  95. <version>2.11.0</version>
  96. </dependency>
  97. <!-- 导入commons-lang3工具包 -->
  98. <dependency>
  99. <groupId>org.apache.commons</groupId>
  100. <artifactId>commons-lang3</artifactId>
  101. <version>3.12.0</version>
  102. </dependency>
  103. <!-- 导入slf4j-api工具包 -->
  104. <dependency>
  105. <groupId>org.slf4j</groupId>
  106. <artifactId>slf4j-api</artifactId>
  107. <version>1.7.30</version>
  108. </dependency>
  109. <!-- 导入logback-core工具包 -->
  110. <dependency>
  111. <groupId>ch.qos.logback</groupId>
  112. <artifactId>logback-core</artifactId>
  113. <version>1.2.3</version>
  114. </dependency>
  115. <!-- 导入logback-classic工具包 -->
  116. <dependency>
  117. <groupId>ch.qos.logback</groupId>
  118. <artifactId>logback-classic</artifactId>
  119. <version>1.2.3</version>
  120. </dependency>
  121. <!--swagger3-->
  122. <dependency>
  123. <groupId>io.springfox</groupId>
  124. <artifactId>springfox-boot-starter</artifactId>
  125. <version>3.0.0</version>
  126. </dependency>
  127. </dependencies>
  128. <profiles>
  129. <profile>
  130. <id>local</id>
  131. <properties>
  132. <env>dev</env>
  133. </properties>
  134. <activation>
  135. <activeByDefault>true</activeByDefault>
  136. </activation>
  137. </profile>
  138. <profile>
  139. <id>prod</id>
  140. <properties>
  141. <env>pro</env>
  142. </properties>
  143. </profile>
  144. </profiles>
  145. <build>
  146. <!-- 产生的构件的文件名,默认值是${artifactId}-${version} -->
  147. <finalName>provider-service</finalName>
  148. <plugins>
  149. <!-- 控制jdk版本 -->
  150. <plugin>
  151. <groupId>org.apache.maven.plugins</groupId>
  152. <artifactId>maven-compiler-plugin</artifactId>
  153. <version>3.10.1</version>
  154. <configuration>
  155. <source>1.8</source>
  156. <target>1.8</target>
  157. <encoding>UTF-8</encoding>
  158. <compilerArguments>
  159. <verbose />
  160. <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>
  161. </compilerArguments>
  162. </configuration>
  163. </plugin>
  164. <!-- 导入生成Jar文件插件,可以将应用打包成一个可执行的Jar包,直接使用java -jar命令执行 -->
  165. <plugin>
  166. <groupId>org.springframework.boot</groupId>
  167. <artifactId>spring-boot-maven-plugin</artifactId>
  168. </plugin>
  169. </plugins>
  170. <resources>
  171. <resource>
  172. <directory>src/main/resources</directory>
  173. <excludes>
  174. <exclude>application-*.yml</exclude>
  175. </excludes>
  176. </resource>
  177. <resource>
  178. <directory>src/main/resources</directory>
  179. <filtering>true</filtering>
  180. <includes>
  181. <include>application.yml</include>
  182. <include>application-${env}*.yml</include>
  183. </includes>
  184. </resource>
  185. </resources>
  186. </build>
  187. </project>