pom.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>cn.blog</groupId>
  8. <artifactId>blog</artifactId>
  9. <version>4.8.1</version>
  10. </parent>
  11. <artifactId>blog-web</artifactId>
  12. <dependencies>
  13. <dependency>
  14. <groupId>org.springframework.boot</groupId>
  15. <artifactId>spring-boot-starter-web</artifactId>
  16. </dependency>
  17. <dependency>
  18. <groupId>org.springframework.boot</groupId>
  19. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  20. </dependency>
  21. <dependency>
  22. <groupId>cn.blog</groupId>
  23. <artifactId>blog-business</artifactId>
  24. </dependency>
  25. <!-- pagehelper 分页插件 -->
  26. <dependency>
  27. <groupId>com.github.pagehelper</groupId>
  28. <artifactId>pagehelper-spring-boot-starter</artifactId>
  29. </dependency>
  30. <!-- spring-boot-devtools -->
  31. <dependency>
  32. <groupId>org.springframework.boot</groupId>
  33. <artifactId>spring-boot-devtools</artifactId>
  34. <optional>true</optional> <!-- 表示依赖不会传递 -->
  35. </dependency>
  36. <!-- Mysql驱动包 -->
  37. <dependency>
  38. <groupId>mysql</groupId>
  39. <artifactId>mysql-connector-java</artifactId>
  40. </dependency>
  41. <!-- 阿里数据库连接池 -->
  42. <dependency>
  43. <groupId>com.alibaba</groupId>
  44. <artifactId>druid-spring-boot-starter</artifactId>
  45. </dependency>
  46. <!-- swagger3-->
  47. <dependency>
  48. <groupId>io.springfox</groupId>
  49. <artifactId>springfox-boot-starter</artifactId>
  50. </dependency>
  51. <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
  52. <dependency>
  53. <groupId>io.swagger</groupId>
  54. <artifactId>swagger-models</artifactId>
  55. <version>1.6.2</version>
  56. </dependency>
  57. </dependencies>
  58. <build>
  59. <plugins>
  60. <plugin>
  61. <groupId>org.springframework.boot</groupId>
  62. <artifactId>spring-boot-maven-plugin</artifactId>
  63. <version>2.5.15</version>
  64. <configuration>
  65. <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
  66. </configuration>
  67. <executions>
  68. <execution>
  69. <goals>
  70. <goal>repackage</goal>
  71. </goals>
  72. </execution>
  73. </executions>
  74. </plugin>
  75. <plugin>
  76. <groupId>org.apache.maven.plugins</groupId>
  77. <artifactId>maven-war-plugin</artifactId>
  78. <version>3.0.0</version>
  79. <configuration>
  80. <failOnMissingWebXml>false</failOnMissingWebXml>
  81. <warName>${project.artifactId}</warName>
  82. </configuration>
  83. </plugin>
  84. <!-- YUI Compressor (CSS/JS压缩)
  85. <plugin>
  86. <groupId>net.alchim31.maven</groupId>
  87. <artifactId>yuicompressor-maven-plugin</artifactId>
  88. <version>1.5.1</version>
  89. <executions>
  90. <execution>
  91. <phase>prepare-package</phase>
  92. <goals>
  93. <goal>compress</goal>
  94. </goals>
  95. </execution>
  96. </executions>
  97. <configuration>
  98. <encoding>UTF-8</encoding>
  99. <jswarn>false</jswarn>
  100. <nosuffix>true</nosuffix>
  101. <linebreakpos>50000</linebreakpos>
  102. <sourceDirectory>src/main/resources/static</sourceDirectory>
  103. <force>true</force>
  104. <includes>
  105. <include>**/*.js</include>
  106. <include>**/*.css</include>
  107. </includes>
  108. <excludes>
  109. <exclude>**/*.min.js</exclude>
  110. <exclude>**/*.min.css</exclude>
  111. <exclude>**/fileinput.js</exclude>
  112. <exclude>**/validate/**</exclude>
  113. <exclude>**/bootstrap-table/**</exclude>
  114. </excludes>
  115. </configuration>
  116. </plugin> -->
  117. </plugins>
  118. <finalName>${project.artifactId}</finalName>
  119. </build>
  120. </project>