初始化版本
This commit is contained in:
71
src/main/resources/application.yml
Normal file
71
src/main/resources/application.yml
Normal file
@ -0,0 +1,71 @@
|
||||
|
||||
server:
|
||||
port: 8088
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: sczx-service # 微服务名称
|
||||
http:
|
||||
encoding:
|
||||
charset: UTF-8
|
||||
enabled: true
|
||||
force: true
|
||||
mvc:
|
||||
async:
|
||||
request-timeout: -1
|
||||
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: localhost:8848 # Nacos 地址
|
||||
|
||||
datasource:
|
||||
url: jdbc:mysql://115.190.8.52:3306/sczx?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
username: sczx_user
|
||||
password: Sczx123@
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
maximum-pool-size: 10
|
||||
auto-commit: true
|
||||
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: update
|
||||
show-sql: true
|
||||
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
|
||||
lifecycle:
|
||||
timeout-per-shutdown-phase: 30s # 设置优雅停机时间
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: "*" # 暴露所有监控端点
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
|
||||
feign:
|
||||
client:
|
||||
config:
|
||||
default:
|
||||
connectTimeout: 5000
|
||||
readTimeout: 5000
|
||||
hystrix:
|
||||
enabled: true # 启用 Feign 的 Hystrix 支持
|
||||
|
||||
hystrix:
|
||||
command:
|
||||
default:
|
||||
execution:
|
||||
isolation:
|
||||
thread:
|
||||
timeoutInMilliseconds: 10000 # 默认熔断超时时间
|
||||
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
url: /v3/api-docs
|
||||
path: /doc.html
|
||||
packages-to-scan: com.sczx.app.controller # 替换为你的 controller 包路径
|
||||
debug: true
|
||||
Reference in New Issue
Block a user