init local code

This commit is contained in:
chenxing
2026-09-07 09:09:39 +08:00
commit 99cd26b3d2
259 changed files with 20554 additions and 0 deletions
+100
View File
@@ -0,0 +1,100 @@
server:
port: 8072
servlet:
context-path: /cms
spring:
application:
name: cms
datasource:
url: jdbc:mysql://localhost:3306/bsch_cms?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
hibernate:
ddl-auto: update
show-sql: false
open-in-view: false
properties:
hibernate:
jdbc:
time_zone: Asia/Shanghai
jackson:
# 管理端 JSON 时间格式(前端 DatePicker 对齐 yyyy-MM-dd HH:mm:ss)
date-format: yyyy-MM-dd HH:mm:ss
time-zone: Asia/Shanghai
# ===== 门户 SSR =====
thymeleaf:
cache: false # 本地改模板热生效;生产注入覆盖为 true(方案 §6.2)
prefix: classpath:/templates/
suffix: .html
encoding: UTF-8
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
# 1-2 校规模:Caffeine 本地缓存(对齐缓存决策「单实例部署」结论)
cache:
type: caffeine
caffeine:
spec: maximumSize=10000,expireAfterWrite=5m
# ===== 基础平台 yh 配置(UserHome 同款三件套)=====
yh:
auth:
enabled: true
sso:
server-url-prefix: http://sso.yunhaixingtong.com
# 本地 dev 必须指向前端 dev server(8073):CAS 验票回跳走 vite 代理,
# 配合前端代理的 cookiePathRewrite 才能让 JSESSIONID(path=/cms) 进入 /api 请求;
# 指回 8072 会导致 8073 页面会话死循环。生产由 projman 注入覆盖,不受此值影响。
client-host-url: http://localhost:8073
allow-headers: all
allow-origins: all
# ⚠️ 只拦管理端 API;门户 /portal/** 必须匿名可访问(SEO/首屏刚需),勿放进 pattern
url-pattern: /api/*
mobi-api-pattern: /mobiapi/*
app-auth:
enabled: true
# UserBase 注册后分配(进白名单),与 yh.open 保持一致;生产由 projman 注入
app-key: 100005
app-secret: 2c7885de594742cc840b8762910b2d2e
open:
enabled: true
base-host: http://base.yunhaixingtong.com
base-path: /userbase
app-key: 100005
app-secret: 2c7885de594742cc840b8762910b2d2e
# ===== CMS 专属配置 =====
cms:
# 超管判定:BoaUser.type == 1(UserBase sys_user.type=1 平台约定,无注入配置);
# 校级权限按 currentRole.schId → site.sch_id 校验(方案 §7.2)
portal:
# 详情页浏览器缓存(秒),配合后端 5 分钟数据缓存(方案 §8.3)
detail-max-age: 300
# base 域对外基地址(C-6,方案 §8.6「未配 public_base_url 默认派生 base 域规范路径」的固化配置):
# 含 context-path,如 https://base.yunhaixingtong.com/cms;生产由 projman 注入。
# 为空(本地开发默认)时按当前请求派生(反代下经 ForwardedHeaderFilter 修正 scheme/port,B-2)。
base-origin: ""
logging:
level:
com.yunhai.cms: debug
management:
endpoints:
web:
exposure:
include: health
endpoint:
health:
show-details: never
# 文件上传(同 UserHome 双 key 约定,方案 §7.3)
# FILE_WEB_PATH 只接受相对路径(默认 /cms/upload/,含 context-path)或公网可达绝对地址;
# 禁止填 localhost/内网绝对地址——webUrl 入库后非本机访问全部断图(B-1/C-5)。
# 门户渲染侧由 PortalUrlHelper.upload() 按访问基准补全为完整 URL。
FILE_PATH: D:/bsch/cms/upload/
FILE_WEB_PATH: /cms/upload/