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:
@@ -0,0 +1,14 @@
|
||||
server:
|
||||
address: 0.0.0.0
|
||||
port: 8086
|
||||
|
||||
spring:
|
||||
web:
|
||||
cors:
|
||||
enabled: false
|
||||
|
||||
yh:
|
||||
sso:
|
||||
client-host-url: http://192.168.10.166:8086
|
||||
|
||||
FILE_WEB_PATH: http://localhost:8086/upload/
|
||||
@@ -0,0 +1,9 @@
|
||||
server:
|
||||
address: 0.0.0.0
|
||||
port: 8087
|
||||
|
||||
yh:
|
||||
sso:
|
||||
client-host-url: http://192.168.10.166:8087
|
||||
|
||||
FILE_WEB_PATH: http://localhost:8087/upload/
|
||||
@@ -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/
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
spring:
|
||||
application:
|
||||
name: bschclassmanage
|
||||
profiles:
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
# Nacos 配置中心地址;生产也可通过环境变量 NACOS_ADDR 覆盖
|
||||
server-addr: ${NACOS_ADDR:nacos.yunhaixingtong.com:8848}
|
||||
# public 命名空间
|
||||
namespace: ""
|
||||
# 应用自身配置所在分组
|
||||
group: NOTICE
|
||||
# 配置文件格式;最终主配置 dataId = ${spring.application.name}.${file-extension},即 notice.yaml
|
||||
file-extension: yaml
|
||||
encode: UTF-8
|
||||
# nacos 不可达时不强制退出,回退到本地 application.yml 兜底
|
||||
fail-fast: false
|
||||
# 只读账号
|
||||
username: yh-reader
|
||||
password: 123456
|
||||
# 共享公共配置:public 空间下的 common.properties
|
||||
shared-configs:
|
||||
- data-id: common.properties
|
||||
group: DEFAULT_GROUP
|
||||
refresh: false
|
||||
Reference in New Issue
Block a user