refactor: 项目重构为 bschclassmanage 包结构,修复启动/CORS/路由问题

- 根包 com.bestsch.classicalchinese 重命名为 com.bestsch.bschclassmanage
- 修复 CORS 启动失败:allowCredentials=true 时 allowedOrigins 不能含 "*",
  23 个 Controller 的 @CrossOrigin 改用语义等价的 originPatterns
- 修复 /api/* 与 /oapi/* 接口 404:API_PATH/OAPI 常量去掉尾斜杠,
  消除 Spring Boot 2.7 PathPattern 下的双斜杠(/api//subject/) 导致的匹配失败
- UserSysRoleArgumentResolver 增加从 URL 参数 currentrole 回退解析(便于本地调试),
  原请求头 currentrole 注入方式保持不变
This commit is contained in:
Allen
2026-08-12 16:59:57 +08:00
parent 9e06e21b9d
commit 66cd0f1515
398 changed files with 21631 additions and 13592 deletions
+99 -25
View File
@@ -5,18 +5,41 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.4.RELEASE</version>
<!-- <version>2.2.4.RELEASE</version>-->
<version>2.7.18</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.bestsch.previewUnit</groupId>
<artifactId>previewunit</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>previewunit</name>
<!-- <groupId>com.bestsch.previewUnit</groupId>-->
<artifactId>BschClass</artifactId>
<version>0.1</version>
<name>BschClass</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<tomcat.version>9.0.63</tomcat.version>
</properties>
<dependencyManagement>
<!-- 基础平台版本管理(含 yh-* 架包与 spring-boot-dependencies 对齐) -->
<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>
<!-- Spring Cloud Alibaba(Nacos 配置中心,对齐 Boot 2.7) -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>2021.0.5.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -30,21 +53,28 @@
<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>-->
<!-- <scope>runtime</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version> <!-- 明确指定版本 -->
<scope>runtime</scope>
</dependency>
<!--bsch-->
<dependency>
<groupId>com.bestsch</groupId>
<artifactId>bsch-spring-boot-starter</artifactId>
<version>1.2.5-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.bestsch</groupId>-->
<!-- <artifactId>bsch-spring-boot-starter</artifactId>-->
<!-- <version>1.2.5-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>cn.hutool</groupId>
@@ -108,24 +138,10 @@
<version>20210307</version>
</dependency>
<!--百度 API SDK-->
<dependency>
<groupId>com.baidu.aip</groupId>
<artifactId>java-sdk</artifactId>
<version>4.16.19</version>
</dependency>
<!-- 视频转码-->
<dependency>
<groupId>ws.schild</groupId>
<artifactId>jave-core</artifactId>
<version>2.4.6</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.10.0</version>
<version>3.14.9</version>
</dependency>
<!-- Apache POI -->
@@ -136,7 +152,49 @@
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- easypoi style -->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-spring-boot-starter</artifactId>
<version>4.2.0</version> <!-- 或其他稳定版本,如 4.1.0、4.2.0 -->
</dependency>
<!-- 基础平台架包:认证(CAS/会话/SSO)+ 应用间签名鉴权 + 用户中心静态门面 + 统一响应 -->
<dependency>
<groupId>com.yunhai.platform</groupId>
<artifactId>yh-auth-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.yunhai.platform</groupId>
<artifactId>yh-app-auth-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.yunhai.platform</groupId>
<artifactId>yh-openapi-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.yunhai.platform</groupId>
<artifactId>yh-api-std</artifactId>
</dependency>
<!-- CAS 客户端(浏览器 SSO 重定向 / ticket 校验 / getRemoteUser 包装)。
版本 3.5.1 已在本地 .m2 仓库。 -->
<dependency>
<groupId>org.jasig.cas.client</groupId>
<artifactId>cas-client-core</artifactId>
<version>3.5.1</version>
</dependency>
</dependencies>
@@ -149,4 +207,20 @@
</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>
<!--
ci 构建档案:将构建产物重定向到 IDE(IntelliJ/Eclipse)索引目录之外,
避免 IDE 后台进程持续锁定 target/maven-status/.../createdFiles.lst 导致
"Error while storing the mojo status / 拒绝访问"。
输出目录需从未被 IDE 打开过。常规本地构建无需激活此 profile。
-->
</project>