pom.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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.2.4.RELEASE</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>com.caimei</groupId>
  12. <artifactId>caimei-mall</artifactId>
  13. <version>1.0-SNAPSHOT</version>
  14. <properties>
  15. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  16. <maven.compiler.source>1.8</maven.compiler.source>
  17. <maven.compiler.target>1.8</maven.compiler.target>
  18. </properties>
  19. <dependencies>
  20. <dependency>
  21. <groupId>org.projectlombok</groupId>
  22. <artifactId>lombok</artifactId>
  23. <optional>true</optional>
  24. </dependency>
  25. <dependency>
  26. <groupId>com.caimei.module</groupId>
  27. <artifactId>caimei-search</artifactId>
  28. <version>0.0.1-SNAPSHOT</version>
  29. </dependency>
  30. <dependency>
  31. <groupId>commons-beanutils</groupId>
  32. <artifactId>commons-beanutils</artifactId>
  33. <version>1.9.4</version>
  34. </dependency>
  35. <!--spring Boot原始依赖-->
  36. <dependency>
  37. <groupId>org.springframework.boot</groupId>
  38. <artifactId>spring-boot-starter-web</artifactId>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.springframework.boot</groupId>
  42. <artifactId>spring-boot-starter-test</artifactId>
  43. <scope>test</scope>
  44. </dependency>
  45. <!-- 添加mybatis的核心包 -->
  46. <dependency>
  47. <groupId>org.mybatis.spring.boot</groupId>
  48. <artifactId>mybatis-spring-boot-starter</artifactId>
  49. <version>2.1.1</version>
  50. </dependency>
  51. <dependency>
  52. <groupId>mysql</groupId>
  53. <artifactId>mysql-connector-java</artifactId>
  54. <version>8.0.18</version>
  55. </dependency>
  56. <dependency>
  57. <groupId>com.alibaba</groupId>
  58. <artifactId>fastjson</artifactId>
  59. <version>1.2.6</version>
  60. </dependency>
  61. <!-- 分页插件 -->
  62. <dependency>
  63. <groupId>com.github.pagehelper</groupId>
  64. <artifactId>pagehelper-spring-boot-starter</artifactId>
  65. <version>1.2.3</version>
  66. </dependency>
  67. <!--模板引擎-->
  68. <dependency>
  69. <groupId>org.springframework.boot</groupId>
  70. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  71. </dependency>
  72. <!--允许不严格的html5格式出现-->
  73. <dependency>
  74. <groupId>net.sourceforge.nekohtml</groupId>
  75. <artifactId>nekohtml</artifactId>
  76. <version>1.9.22</version>
  77. </dependency>
  78. <!--springboot使用tomcat容器-->
  79. <dependency>
  80. <groupId>org.springframework.boot</groupId>
  81. <artifactId>spring-boot-starter-tomcat</artifactId>
  82. <scope>compile</scope>
  83. </dependency>
  84. <!--struts-->
  85. <dependency>
  86. <groupId>org.apache.struts</groupId>
  87. <artifactId>struts2-core</artifactId>
  88. <version>2.3.32</version>
  89. <exclusions>
  90. <exclusion>
  91. <groupId>javassist</groupId>
  92. <artifactId>javassist</artifactId>
  93. </exclusion>
  94. </exclusions>
  95. </dependency>
  96. </dependencies>
  97. <profiles>
  98. <profile>
  99. <id>dev</id>
  100. <properties>
  101. <!-- 环境标识,需要与配置文件的名称相对应 -->
  102. <activatedProperties>dev</activatedProperties>
  103. </properties>
  104. <activation>
  105. <!-- 默认环境 -->
  106. <activeByDefault>true</activeByDefault>
  107. </activation>
  108. </profile>
  109. <profile>
  110. <id>test</id>
  111. <properties>
  112. <activatedProperties>test</activatedProperties>
  113. </properties>
  114. </profile>
  115. <profile>
  116. <id>prod</id>
  117. <properties>
  118. <activatedProperties>prod</activatedProperties>
  119. </properties>
  120. </profile>
  121. </profiles>
  122. <build>
  123. <resources>
  124. <resource>
  125. <!--配置文件路径 -->
  126. <directory>src/main/resources</directory> <!--这里对应项目存放配置文件的目录-->
  127. <!--开启filtering功能 -->
  128. <filtering>true</filtering>
  129. </resource>
  130. <resource>
  131. <directory>src/main/resources/${activatedProperties}</directory>
  132. <filtering>true</filtering>
  133. </resource>
  134. </resources>
  135. <plugins>
  136. <plugin>
  137. <groupId>org.springframework.boot</groupId>
  138. <artifactId>spring-boot-maven-plugin</artifactId>
  139. <configuration>
  140. <mainClass>com.caimei.StartApplication</mainClass><!--springboot启动类目录-->
  141. </configuration>
  142. <executions>
  143. <execution>
  144. <goals>
  145. <!--创建一个自动可执行的jar或war文件 -->
  146. <goal>repackage</goal>
  147. </goals>
  148. </execution>
  149. </executions>
  150. </plugin>
  151. </plugins>
  152. </build>
  153. </project>