安全配置示例(application-prod.yml)
安全配置示例(application-prod.yml)
management:
endpoints:
web:
exposure:
include: health,info # 仅暴露必要端点
endpoint:
health:
show-details: never
server:
port: 9090 # 管理端口与业务端口分离
security:
enabled: true # 配合 Spring Security 限制访问heapdump 端点可导出内存快照,其中可能包含密钥与凭据;即使处于内网也不应随意开放。