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
+21 -38
View File
@@ -1,6 +1,3 @@
server:
port: 8086
spring:
mvc:
date-format: yyyy-MM-dd HH:mm:ss
@@ -15,7 +12,7 @@ spring:
host: 127.0.0.1
port: 6379
database: 0
password: 123
#password: 123
rabbitmq:
host: 127.0.0.1
port: 5672
@@ -30,17 +27,17 @@ spring:
redis:
repositories:
enabled: false
# http:
# encoding:
# force: true
# charset: utf-8
# enabled: true
http:
encoding:
force: true
charset: utf-8
enabled: true
datasource:
url: jdbc:mysql://localhost:3306/classicalchinese?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://localhost:3306/dbschoolclass?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123
driver-class-name: com.mysql.jdbc.Driver
password: 123123
driver-class-name: com.mysql.cj.jdbc.Driver
min-idle: 30
max-active: 30
hikari:
@@ -65,41 +62,27 @@ spring:
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
format_sql: true # 格式化 SQL,方便阅读
open-in-view: true
bsch:
yh:
sso:
# service-url-prefix: http://sso.bestsch.com
server-url-prefix: http://sso.bestsch.com
client-host-url: http://localhost:8086
server-url-prefix: http://sso.yunhaixingtong.com/cas/
client-host-url: http://192.168.10.166:8086
allow-headers: all
allow-origins: all
url-pattern: /api/*
ignore-pattern: /mobiapi/*|mobiapi2/*|/qywxapi/*
mobi-api-pattern: /mobiapi/*
app-auth:
enabled: true
# 本应用自身身份(客户端签名用)
app-key: 100001
app-secret: ec4e860206374c80938719fff8e14a86
open:
base-host: http://base.bestsch.com
photo_url: http://base.bestsch.com/
app-key: 100614
app-secret: f03fd6e4f5da4b108127cd74f05ee767
schbase-host: http://base.bestsch.com/BschClass
zyk-host: http://base.bestsch.com/BschZyk
openai:
host: https://one2.app011.cn:8443/v1/completions
api-key: sk-PFVGDLriMVkt01Id4e094470060d41D281D42580C00f9380
#host: https://api.deepseek.com/chat/completions
#api-key: sk-ce9491557e6247378727e0971359f75e
max-tokens: 5000
temperature: 0.5
oahost: https://oa2.schsoft.cn
baidu:
api:
app_id: 33374298
app_key: UiZ4yP5jaUABm3QsjB824oqM
app_secret: j5lX1xEhzAqLCQuZ2obR3HMtQYL7144s
enabled: true
base-host: http://base.yunhaixingtong.com
user-center-url: http://base.yunhaixingtong.com/userbase
FILE_PATH: D://工作区/JAVA/bsch/