From b747888f2347e0cc881df09f101abf79f721c1c6 Mon Sep 17 00:00:00 2001 From: laixingyu Date: Mon, 18 Dec 2023 15:21:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E8=AE=B0=E8=B4=A6?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-druid.yml | 11 ++++++----- ruoyi-admin/src/main/resources/application.yml | 18 +++++++++++------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index ed582a3..fc5c513 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -7,15 +7,16 @@ spring: # 主库数据源 master: url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# url: jdbc:mysql://192.168.0.222:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: 1qazse42W3 # 从库数据源 slave: # 从数据源开关/默认关闭 enabled: false - url: - username: - password: + url: + username: + password: # 初始连接数 initialSize: 5 # 最小连接池数量 @@ -35,7 +36,7 @@ spring: testWhileIdle: true testOnBorrow: false testOnReturn: false - webStatFilter: + webStatFilter: enabled: true statViewServlet: enabled: true @@ -54,4 +55,4 @@ spring: merge-sql: true wall: config: - multi-statement-allow: true \ No newline at end of file + multi-statement-allow: true diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index d9f2459..b08a9d0 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -45,7 +45,7 @@ spring: messages: # 国际化资源文件路径 basename: i18n/messages - profiles: + profiles: active: druid # 文件上传 servlet: @@ -65,17 +65,21 @@ spring: host: localhost # 端口,默认为6379 port: 6379 +# # 地址 +# host: 192.168.0.222 +# # 端口,默认为6379 +# port: 6380 # 数据库索引 database: 0 # 密码 - password: + password: # 连接超时时间 timeout: 10s lettuce: pool: # 连接池中的最小空闲连接 min-idle: 0 - # 连接池中的最大空闲连接 + # 连接池中的最大空闲连接yi max-idle: 8 # 连接池的最大数据库连接数 max-active: 8 @@ -90,7 +94,7 @@ token: secret: abcdefghijklmnopqrstuvwxyz # 令牌有效期(默认30分钟) expireTime: 30 - + # MyBatis配置 mybatis: # 搜索指定包别名 @@ -101,10 +105,10 @@ mybatis: configLocation: classpath:mybatis/mybatis-config.xml # PageHelper分页插件 -pagehelper: +pagehelper: helperDialect: mysql supportMethodsArguments: true - params: count=countSql + params: count=countSql # Swagger配置 swagger: @@ -114,7 +118,7 @@ swagger: pathMapping: /dev-api # 防止XSS攻击 -xss: +xss: # 过滤开关 enabled: true # 排除链接(多个用逗号分隔)