build / build-push (push) Successful in 1m25s
- 删自写 svcitem/config/OpenApiAuthEnforceConfiguration(yh-app-auth starter 版 RequireAppSignFilter 承接,order+11 行为等价;/oapi/site/list 面无签名即 401) - yh.app-auth.server.enforce-patterns=[/oapi/*] + trust-registry=true(中央密钥链组合: trusted-apps 100018 先、Redis sign:app:* 链后,Notice/flow-center 同款) - data-redis 自 test scope 提升编译期(yh-app-auth 侧 optional 不传递,生产 classpath 此前并无该依赖);management.health.redis.enabled=false 防 Redis 抖动拉 DOWN 健康 - 测试 yml 同步 enforce-patterns:删自写副本后 SiteOapiIT 的 /oapi/** 401 断言由 starter 过滤器承接;trust-registry 不进测试配置(IT 密封性,签名用例 100018 走 trusted-apps 命中) 门禁:mvn test -Dskip.tests=false 413/413 绿(含 SiteOapiIT 6/6,本机 MySQL8+Redis)
156 lines
6.8 KiB
XML
156 lines
6.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
<parent>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-parent</artifactId>
|
||
<version>2.7.18</version>
|
||
<relativePath/>
|
||
</parent>
|
||
<groupId>com.yunhai</groupId>
|
||
<artifactId>cms</artifactId>
|
||
<version>0.1</version>
|
||
<name>cms</name>
|
||
<description>yh-platform 高校门户 CMS(管理端 API + Thymeleaf 门户 SSR)</description>
|
||
<properties>
|
||
<java.version>1.8</java.version>
|
||
<!-- 测试执行开关:默认关闭(*IT 依赖本地 MySQL/Redis,详见 build 内 surefire 注释);
|
||
需要跑测试时用 -Dskip.tests=false 临时打开 -->
|
||
<skip.tests>true</skip.tests>
|
||
</properties>
|
||
|
||
<dependencyManagement>
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>com.yunhai.platform</groupId>
|
||
<artifactId>yh-platform-dependencies</artifactId>
|
||
<version>1.0.0-SNAPSHOT</version>
|
||
<type>pom</type>
|
||
<scope>import</scope>
|
||
</dependency>
|
||
</dependencies>
|
||
</dependencyManagement>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-web</artifactId>
|
||
</dependency>
|
||
<!-- 门户 SSR(SEO/首屏刚需,方案 §3.1) -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||
</dependency>
|
||
<!-- 模板内 LocalDateTime 格式化(#temporals) -->
|
||
<dependency>
|
||
<groupId>org.thymeleaf.extras</groupId>
|
||
<artifactId>thymeleaf-extras-java8time</artifactId>
|
||
</dependency>
|
||
<!-- 1-2 校规模本地缓存;上量切 Redis 仅改配置(方案 §4.1/§8.4) -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-cache</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||
<artifactId>caffeine</artifactId>
|
||
</dependency>
|
||
<!-- 参数校验(@Valid + 平台 GlobalExceptionHandler 统一包装) -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-validation</artifactId>
|
||
</dependency>
|
||
|
||
<!-- 基础平台全家桶(聚合 starter):CAS 认证 + 应用间签名 + 统一响应 + OpenAPI 客户端 +
|
||
actuator 健康探活,一行带齐(同 UserHome/Notice 约定) -->
|
||
<dependency>
|
||
<groupId>com.yunhai.platform</groupId>
|
||
<artifactId>yh-spring-boot-starter</artifactId>
|
||
</dependency>
|
||
<!-- CAS 客户端(UserHome 同款显式声明) -->
|
||
<dependency>
|
||
<groupId>org.jasig.cas.client</groupId>
|
||
<artifactId>cas-client-core</artifactId>
|
||
<version>3.5.1</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
<version>1.18.36</version>
|
||
<optional>true</optional>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>mysql</groupId>
|
||
<artifactId>mysql-connector-java</artifactId>
|
||
<version>8.0.33</version>
|
||
<scope>runtime</scope>
|
||
</dependency>
|
||
<!-- 富文本正文入库前白名单清洗(方案 §8.5 内容安全);平台内无现成实现,自引入 -->
|
||
<dependency>
|
||
<groupId>org.jsoup</groupId>
|
||
<artifactId>jsoup</artifactId>
|
||
<version>1.17.2</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-test</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
<!-- 入站验签走中央密钥链(注册表模式 yh.app-auth.trust-registry)必须编译期引入 data-redis:
|
||
yh-app-auth 的该依赖是 optional、不传递(Notice/flow-center/svc-hall 同款,2026-10-05 自
|
||
test scope 提升)。副作用是 RedisHealthIndicator 会被装配,故 yml 里关掉
|
||
management.health.redis.enabled,防 Redis 抖动把 /actuator/health 拉成 DOWN(503)。
|
||
RedisCacheEvolutionIT(缓存演进验证)继续复用本依赖。 -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<finalName>cms</finalName>
|
||
<plugins>
|
||
<plugin>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||
</plugin>
|
||
<!-- 本工程测试命名约定:纯单元 *Test + 集成 *IT(连本地 MySQL/Redis),统一由 surefire 执行 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-surefire-plugin</artifactId>
|
||
<configuration>
|
||
<!--
|
||
测试执行默认关闭(2026-09-15):*IT 依赖本地 MySQL/Redis,缺中间件时成片报
|
||
Communications link failure / 上下文加载失败(353 例里约 262 例),噪音掩盖真信号;
|
||
CI 构建本就是 mvn -DskipTests package,关掉后本地 mvn test/package 不再空跑约 20 分钟。
|
||
只跳过「执行」,测试源码仍会编译,接口漂移仍能在编译期暴露。
|
||
需要跑时临时覆盖:mvn test -Dskip.tests=false
|
||
-->
|
||
<skipTests>${skip.tests}</skipTests>
|
||
<includes>
|
||
<include>**/*Test.java</include>
|
||
<include>**/*IT.java</include>
|
||
</includes>
|
||
</configuration>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
|
||
<repositories>
|
||
<repository>
|
||
<id>nexus-public</id>
|
||
<name>bsch/nexus public</name>
|
||
<url>http://nexus.yunhaixingtong.com/repository/maven-public/</url>
|
||
<releases><enabled>true</enabled></releases>
|
||
<snapshots><enabled>true</enabled></snapshots>
|
||
</repository>
|
||
</repositories>
|
||
</project>
|