pom.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>org.springframework.boot</groupId>
  8. <artifactId>spring-boot-starter-parent</artifactId>
  9. <version>2.7.18</version>
  10. <relativePath/>
  11. </parent>
  12. <groupId>com.demo</groupId>
  13. <artifactId>ir-backend</artifactId>
  14. <version>1.0.0</version>
  15. <packaging>war</packaging>
  16. <name>ir-backend</name>
  17. <description>微前端平台后端服务(兼容东方通 TongWeb 部署)</description>
  18. <properties>
  19. <java.version>1.8</java.version>
  20. <maven.compiler.source>1.8</maven.compiler.source>
  21. <maven.compiler.target>1.8</maven.compiler.target>
  22. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  23. </properties>
  24. <dependencies>
  25. <!-- Web 依赖:排除内嵌 Tomcat,便于在东方通等外置容器部署 -->
  26. <dependency>
  27. <groupId>org.springframework.boot</groupId>
  28. <artifactId>spring-boot-starter-web</artifactId>
  29. <exclusions>
  30. <exclusion>
  31. <groupId>org.springframework.boot</groupId>
  32. <artifactId>spring-boot-starter-tomcat</artifactId>
  33. </exclusion>
  34. </exclusions>
  35. </dependency>
  36. <!-- 内嵌 Tomcat 作为 provided:开发/本地以 java -jar 运行时生效;
  37. 打进 WAR 时不包含,避免与东方通 Servlet 容器冲突 -->
  38. <dependency>
  39. <groupId>org.springframework.boot</groupId>
  40. <artifactId>spring-boot-starter-tomcat</artifactId>
  41. <scope>provided</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.springframework.boot</groupId>
  45. <artifactId>spring-boot-starter-test</artifactId>
  46. <scope>test</scope>
  47. </dependency>
  48. <!-- SQLite JDBC:本地数据源默认实现(3.45.x 仍兼容 Java 8) -->
  49. <dependency>
  50. <groupId>org.xerial</groupId>
  51. <artifactId>sqlite-jdbc</artifactId>
  52. <version>3.45.3.0</version>
  53. </dependency>
  54. <!-- JWT(jjwt 0.12.x 兼容 Java 8) -->
  55. <dependency>
  56. <groupId>io.jsonwebtoken</groupId>
  57. <artifactId>jjwt-api</artifactId>
  58. <version>0.12.5</version>
  59. </dependency>
  60. <dependency>
  61. <groupId>io.jsonwebtoken</groupId>
  62. <artifactId>jjwt-impl</artifactId>
  63. <version>0.12.5</version>
  64. <scope>runtime</scope>
  65. </dependency>
  66. <dependency>
  67. <groupId>io.jsonwebtoken</groupId>
  68. <artifactId>jjwt-jackson</artifactId>
  69. <version>0.12.5</version>
  70. <scope>runtime</scope>
  71. </dependency>
  72. <!-- 仅取 BCryptPasswordEncoder(不引入完整 Spring Security) -->
  73. <dependency>
  74. <groupId>org.springframework.security</groupId>
  75. <artifactId>spring-security-crypto</artifactId>
  76. <version>5.6.5</version>
  77. </dependency>
  78. </dependencies>
  79. <build>
  80. <!-- WAR 包名称(部署到东方通时的应用名) -->
  81. <finalName>ir-backend</finalName>
  82. <plugins>
  83. <!-- 无 web.xml 也可打 WAR(Servlet 3.0 注解方式,由 SpringBootServletInitializer 引导) -->
  84. <plugin>
  85. <groupId>org.apache.maven.plugins</groupId>
  86. <artifactId>maven-war-plugin</artifactId>
  87. <configuration>
  88. <failOnMissingWebXml>false</failOnMissingWebXml>
  89. </configuration>
  90. </plugin>
  91. <!-- 打包为可执行 WAR:既可用 java -jar 本地运行,也可部署到东方通 -->
  92. <plugin>
  93. <groupId>org.springframework.boot</groupId>
  94. <artifactId>spring-boot-maven-plugin</artifactId>
  95. </plugin>
  96. </plugins>
  97. </build>
  98. </project>