update
This commit is contained in:
@@ -1,76 +1,65 @@
|
||||
#h2 配置
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Default configuration — shared across all profiles.
|
||||
# Profile-specific overrides live in application-h2.yml and application-mysql.yml.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
spring:
|
||||
# Ehcache 3 via JCache (JSR-107) — replaces Ehcache 2 (net.sf.ehcache)
|
||||
cache:
|
||||
type: ehcache
|
||||
ehcache:
|
||||
config: classpath:ehcache.xml
|
||||
type: jcache
|
||||
jcache:
|
||||
config: classpath:ehcache3.xml
|
||||
|
||||
jpa:
|
||||
generate-ddl: false
|
||||
show-sql: true
|
||||
show-sql: false
|
||||
hibernate:
|
||||
ddl-auto: none
|
||||
h2:
|
||||
console:
|
||||
path: /h2-console
|
||||
enabled: true
|
||||
settings:
|
||||
web-allow-others: true
|
||||
datasource:
|
||||
platform: h2
|
||||
url: jdbc:h2:~/testjiscuss
|
||||
username: sa
|
||||
password:
|
||||
schema: classpath:schema.sql
|
||||
data: classpath:data.sql
|
||||
driver-class-name: org.h2.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
min-idle: 2
|
||||
initial-size: 5
|
||||
max-active: 10
|
||||
max-wait: 5000
|
||||
validation-query: select 1SS
|
||||
# 状态监控
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
db-type: h2
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 2000
|
||||
# 监控过滤器
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
exclusions:
|
||||
- "*.js"
|
||||
- "*.gif"
|
||||
- "*.jpg"
|
||||
- "*.png"
|
||||
- "*.css"
|
||||
- "*.ico"
|
||||
- "/druid/*"
|
||||
# druid 监控页面
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
# reset-enable: false
|
||||
# login-username: root
|
||||
# login-password: root
|
||||
# ddl-auto=validate lets Hibernate check that the schema matches entities
|
||||
# without modifying anything; Flyway owns all DDL.
|
||||
ddl-auto: validate
|
||||
|
||||
freemarker:
|
||||
# 设置模板后缀名
|
||||
suffix: .ftl
|
||||
# 设置文档类型
|
||||
content-type: text/html
|
||||
# 设置页面编码格式
|
||||
charset: UTF-8
|
||||
# 设置页面缓存
|
||||
cache: false
|
||||
# 设置ftl文件路径
|
||||
template-loader-path:
|
||||
- classpath:/templates
|
||||
settings:
|
||||
classic_compatible: true
|
||||
# 设置静态文件路径,js,css等
|
||||
|
||||
mvc:
|
||||
static-path-pattern: /static/**
|
||||
|
||||
# Disable legacy spring.datasource.schema / spring.datasource.data initialisation;
|
||||
# Flyway handles all schema setup in db/migration/.
|
||||
sql:
|
||||
init:
|
||||
mode: never
|
||||
|
||||
# Expose Flyway information via Actuator (read-only)
|
||||
flyway:
|
||||
enabled: true
|
||||
baseline-on-migrate: true # safe for existing databases without flyway_schema_history
|
||||
|
||||
# Actuator: expose health + info publicly; restrict all other endpoints to ROLE_ADMIN
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,metrics,flyway
|
||||
endpoint:
|
||||
health:
|
||||
show-details: when-authorized
|
||||
|
||||
# Forward header strategy — set to NATIVE when running behind a trusted reverse proxy
|
||||
# so Spring uses X-Forwarded-* headers for request URL/IP resolution.
|
||||
server:
|
||||
port: 80
|
||||
port: 80
|
||||
forward-headers-strategy: NONE # change to NATIVE behind a trusted proxy
|
||||
|
||||
# SpringDoc OpenAPI — UI at /swagger-ui/index.html
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
api-docs:
|
||||
path: /v3/api-docs
|
||||
|
||||
Reference in New Issue
Block a user