From b70501c7501e13d821b0d5f0eda659462653ed53 Mon Sep 17 00:00:00 2001 From: Cool <747682928@qq.com> Date: Fri, 5 Jul 2024 15:08:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=8B=A6=E6=88=AA=E5=99=A8,r?= =?UTF-8?q?edis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/example/aitest/jwt/InterceptorConfig.java | 5 ----- src/main/resources/application.yml | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/aitest/jwt/InterceptorConfig.java b/src/main/java/com/example/aitest/jwt/InterceptorConfig.java index cda21d3..d2d6073 100644 --- a/src/main/java/com/example/aitest/jwt/InterceptorConfig.java +++ b/src/main/java/com/example/aitest/jwt/InterceptorConfig.java @@ -17,17 +17,12 @@ public class InterceptorConfig implements WebMvcConfigurer { @Override public void addInterceptors(InterceptorRegistry registry) {//配置拦截器 - System.out.println("拦截器被配置了"); ArrayList excludePath = new ArrayList<>(); excludePath.add("/login");//登录 - excludePath.add("/checkCode"); - excludePath.add("/sendCode"); excludePath.add("/register");//注册 excludePath.add("/apiSend"); excludePath.add("/timeChange"); excludePath.add("/timeGet"); - - excludePath.add("/index/modifyHead"); registry.addInterceptor(tokenInterceptor)//注册拦截器 .addPathPatterns("/**")//拦截所有请求 .excludePathPatterns(excludePath);//添加拦截白名单 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 51f4d61..400a665 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -2,9 +2,11 @@ spring: application: name: AITest redis: + port: 6379 # password: ob666666 - host: localhost + host: 49.233.248.140 + password: aB3cDeF9 datasource: username: root password: 3534957771fb4925