From 4d9bc0583f1111b92b66ffb76669b07c9576b85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Mon, 8 Apr 2024 11:28:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=A4=A9=E6=B0=94=E7=AD=89?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/application-druid.yml | 10 ++++++---- ruoyi-admin/src/main/resources/application.yml | 12 ++++++------ .../com/ruoyi/framework/config/SecurityConfig.java | 6 +++--- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index b66131c4..53280b64 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -8,10 +8,12 @@ spring: master: # 公司数据库地址 # url: jdbc:mysql://10.168.3.169:3306/athena?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 - url: jdbc:mysql://10.168.56.204:3306/jihe-dc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true - username: root -# password: Platform123!@# - password: Platform123!@# +# url: jdbc:mysql://127.0.0.1:3308/event_iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true +# url: jdbc:mysql://127.0.0.1:3308/jihe-dc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true + url: jdbc:mysql://10.168.56.204:3306/jihe-dc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 + username: root + # password: root + password: Platform123!@# # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index f0180661..ae61f5d9 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -67,9 +67,9 @@ spring: # 端口,默认为6379 port: 6379 # 数据库索引 - database: 0 + database: 1 # 密码 - password: Redis123!@# + password: # 连接超时时间 timeout: 10s lettuce: @@ -156,7 +156,7 @@ aj: iot: # 物联平台地址 - address: http://127.0.0.1:8080 + address: https://10.0.81.202:8081 # redis 配置 redis: # 地址 @@ -164,9 +164,9 @@ iot: # 端口,默认为6379 port: 6379 # 数据库索引 - database: 10 + database: 0 # 密码 - password: Redis123!@# + password: # 连接超时时间 timeout: 10s lettuce: @@ -183,4 +183,4 @@ iot: # 允许访问的ip地址 allowed: - ips: 10.0.81.202,10.168.73.54,10.168.71.194 + ips: 10.0.81.202,10.168.73.54,10.168.71.194, diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 046648e7..f76628c4 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -116,7 +116,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { // 过滤请求 .authorizeRequests() // 对于登录login 注册register 验证码captchaImage 允许匿名访问 - .antMatchers("/login", "/register", "/captchaImage").anonymous() + .antMatchers("/login", "/register", "/captchaImage","/dc/**").anonymous() .antMatchers( HttpMethod.GET, "/", @@ -126,8 +126,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { "/**/*.js", "/profile/**" ).permitAll() -// .antMatchers("/swagger-ui.html").anonymous() -// .antMatchers("/swagger-resources/**").anonymous() + .antMatchers("/swagger-ui.html").anonymous() + .antMatchers("/swagger-resources/**").anonymous() .antMatchers("/webjars/**").anonymous() .antMatchers("/*/api-docs").anonymous() .antMatchers("/druid/**").anonymous()