89 lines
1.9 KiB
YAML
89 lines
1.9 KiB
YAML
server:
|
|
port: 8082
|
|
servlet:
|
|
context-path: /api
|
|
|
|
spring:
|
|
application:
|
|
name: room-service
|
|
|
|
# 数据库配置
|
|
datasource:
|
|
type: com.alibaba.druid.pool.DruidDataSource
|
|
driver-class-name: org.postgresql.Driver
|
|
url: jdbc:postgresql://1.14.121.39:5432/edendb?currentSchema=public&charSet=UTF-8
|
|
username: edenuser
|
|
password: edenpswd
|
|
druid:
|
|
initial-size: 5
|
|
min-idle: 5
|
|
max-active: 20
|
|
max-wait: 60000
|
|
time-between-eviction-runs-millis: 60000
|
|
min-evictable-idle-time-millis: 300000
|
|
validation-query: SELECT 1
|
|
test-while-idle: true
|
|
test-on-borrow: false
|
|
test-on-return: false
|
|
pool-prepared-statements: true
|
|
max-pool-prepared-statement-per-connection-size: 20
|
|
|
|
# 启用Swagger
|
|
mvc:
|
|
pathmatch:
|
|
matching-strategy: ant_path_matcher
|
|
|
|
# Redis配置
|
|
redis:
|
|
host: 1.14.121.39
|
|
port: 6379
|
|
password: edenpswd
|
|
database: 0
|
|
timeout: 10000
|
|
lettuce:
|
|
pool:
|
|
max-active: 8
|
|
max-wait: -1
|
|
max-idle: 8
|
|
min-idle: 0
|
|
|
|
# Feign客户端配置
|
|
feign:
|
|
client:
|
|
config:
|
|
default:
|
|
connectTimeout: 5000 # 连接超时时间
|
|
readTimeout: 5000 # 读取超时时间
|
|
hystrix:
|
|
enabled: true # 启用熔断器
|
|
|
|
# 服务注册与发现配置
|
|
eureka:
|
|
client:
|
|
register-with-eureka: false
|
|
fetch-registry: false
|
|
service-url:
|
|
defaultZone: http://localhost:8761/eureka/
|
|
instance:
|
|
prefer-ip-address: true
|
|
|
|
# MyBatis配置
|
|
mybatis:
|
|
mapper-locations: classpath:mapper/**/*.xml
|
|
type-aliases-package: com.eden.room.domain
|
|
configuration:
|
|
map-underscore-to-camel-case: true
|
|
cache-enabled: true
|
|
|
|
# PageHelper分页插件
|
|
pagehelper:
|
|
helper-dialect: postgresql
|
|
reasonable: true
|
|
support-methods-arguments: true
|
|
params: count=countSql
|
|
|
|
# 日志配置
|
|
logging:
|
|
level:
|
|
com.eden.room: debug
|
|
org.springframework: warn |