From 40707dae315780893286fca2eab674a85756d0e8 Mon Sep 17 00:00:00 2001 From: yangjie <1179743470@qq.com> Date: Fri, 14 May 2021 10:13:31 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8A=A0=E4=B8=8A=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/application-prod.properties | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/main/resources/application-prod.properties diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties new file mode 100644 index 0000000..1ac71b4 --- /dev/null +++ b/src/main/resources/application-prod.properties @@ -0,0 +1,59 @@ +# See http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +spring.thymeleaf.cache=false +spring.main.show-banner=false + +logging.level.jdbc=OFF +logging.level.jdbc.sqltiming=DEBUG +logging.level.jdbc.resultsettable=DEBUG +logging.level.com.yipin.liuwar.mapper=DEBUG +#科大数据库 116.63.168.79 +spring.datasource.url=jdbc:mysql://192.168.0.99:3306/keda?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai +spring.datasource.username=root +spring.datasource.password=mssdk@028 +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +#川大数据库 +#spring.datasource.url=jdbc:mysql://139.9.247.137:3306/keda?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai +#spring.datasource.username=root +#spring.datasource.password=123456 +#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver + +spring.mina.port=9123 +spring.mina.buffersize=2048 +spring.mina.idletime=15 + +spring.redis.database=0 +spring.redis.host=127.0.0.1 +spring.redis.password=msdw@2021 +#spring.redis.password= +spring.redis.port=6379 +spring.redis.timeout=3000 +spring.redis.jedis.pool.max-idle=500 +spring.redis.jedis.pool.min-idle=50 +spring.redis.jedis.pool.max-active=2000 +spring.redis.jedis.pool.max-wait=1000 +#spring.redis.pool.max-idle=500 +#spring.redis.pool.min-idle=50 +#spring.redis.pool.max-active=2000 +#spring.redis.pool.max-wait=1000 + +spring.elasticsearch.rest.uris=http://es-cn-v641e944a0006xtwy.elasticsearch.aliyuncs.com:9200 +spring.elasticsearch.rest.username=elastic +spring.elasticsearch.rest.password=1qaz@WSX + +pagehelper.reasonable=false + +# maxFileSize \u5355\u4E2A\u6570\u636E\u5927\u5C0F +spring.servlet.multipart.maxFileSize = 1024MB +# maxRequestSize \u662F\u603B\u6570\u636E\u5927\u5C0F +spring.servlet.multipart.maxRequestSize=10240MB + +logging.level.com.yipin.liuwanr.mapper=debug + +#redis-cluster +redis.cluster.maxTotal=200 +redis.cluster.maxIdle=8 +redis.cluster.minIdle=3 +redis.cluster.nodes=192.168.136.191:8000,192.168.136.191:8001,192.168.136.191:8002 + +server.port=8090 +server.servlet.context-path= /liuwanr \ No newline at end of file From ebae32493d56a317c663df8dabe65fcb0edadd6e Mon Sep 17 00:00:00 2001 From: yangjie <1179743470@qq.com> Date: Fri, 14 May 2021 10:13:37 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8A=A0=E4=B8=8A=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/main/resources/application.yml diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..90385b2 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,3 @@ +spring: + profiles: + active: prod \ No newline at end of file From 3325c1a2a3688afa73bead6b674360b4949421ac Mon Sep 17 00:00:00 2001 From: yangjie <1179743470@qq.com> Date: Fri, 14 May 2021 10:14:29 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83=20utf8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{application.properties => application-dev.properties} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/{application.properties => application-dev.properties} (100%) diff --git a/src/main/resources/application.properties b/src/main/resources/application-dev.properties similarity index 100% rename from src/main/resources/application.properties rename to src/main/resources/application-dev.properties From a86beca6e2cb8179feffab8e9669c6fbd6890294 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 28 May 2021 17:14:23 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=B8=AD=E5=8F=B0=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yipin/liuwanr/service/UserInfoService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java index fa1c87f..3a6c9c9 100644 --- a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java +++ b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java @@ -127,13 +127,13 @@ public class UserInfoService { userInfoMapper.userAddStudent(student); } int size = userProfilesList.size(); - if (size<=0){ +// if (size<=0){ for (int i = 0;i Date: Thu, 3 Jun 2021 17:24:55 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=B8=AD=E5=8F=B0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8B=A6=E6=88=AA=E5=99=A8=EF=BC=8Ctoken?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 6 ++ .../com/yipin/liuwanr/config/AuthConfig.java | 29 ++++++++++ .../com/yipin/liuwanr/entity/UserInfo.java | 3 + .../yipin/liuwanr/filter/AuthInterceptor.java | 58 +++++++++++++++++++ .../liuwanr/service/UserInfoService.java | 13 +++++ 5 files changed, 109 insertions(+) create mode 100644 src/main/java/com/yipin/liuwanr/config/AuthConfig.java create mode 100644 src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java diff --git a/pom.xml b/pom.xml index 1b0714e..e5da5f8 100644 --- a/pom.xml +++ b/pom.xml @@ -271,6 +271,12 @@ 2.3.28 compile + + org.springframework.boot + spring-boot-devtools + runtime + true + root diff --git a/src/main/java/com/yipin/liuwanr/config/AuthConfig.java b/src/main/java/com/yipin/liuwanr/config/AuthConfig.java new file mode 100644 index 0000000..376825b --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/config/AuthConfig.java @@ -0,0 +1,29 @@ +package com.yipin.liuwanr.config; + +/** + * @description + * @author: Mr.JK + * @create: 2021-06-03 16:24 + **/ + +import com.yipin.liuwanr.filter.AuthInterceptor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class AuthConfig implements WebMvcConfigurer { + + @Bean + public AuthInterceptor initAuthInterceptor(){ + return new AuthInterceptor(); + } + + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(initAuthInterceptor()).addPathPatterns("/**") + .excludePathPatterns("/userInfo/adminLogins/**","/userInfo/loginSchoolClient/**","/userInfo/logins/**","/userInfo/updateLogInNumber/**"); + } + +} \ No newline at end of file diff --git a/src/main/java/com/yipin/liuwanr/entity/UserInfo.java b/src/main/java/com/yipin/liuwanr/entity/UserInfo.java index 6949a8c..b1c0922 100644 --- a/src/main/java/com/yipin/liuwanr/entity/UserInfo.java +++ b/src/main/java/com/yipin/liuwanr/entity/UserInfo.java @@ -101,4 +101,7 @@ public class UserInfo { private Integer organizationRelationshipId; //鐧婚檰鏃堕棿 private String dataTime; + + //閴存潈token + private String loginToken; } diff --git a/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java b/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java new file mode 100644 index 0000000..414a255 --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java @@ -0,0 +1,58 @@ +package com.yipin.liuwanr.filter; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.data.redis.core.ValueOperations; +import org.springframework.util.StringUtils; +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.ModelAndView; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +/** + * @description + * @author: Mr.JK + * @create: 2021-06-03 16:19 + **/ +public class AuthInterceptor implements HandlerInterceptor { + + @Resource + StringRedisTemplate stringRedisTemplate; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + response.setCharacterEncoding("UTF-8"); + response.setContentType("text/html;charset=utf-8"); + String token = request.getHeader("token"); + if (StringUtils.isEmpty(token)) { + response.getWriter().print("0");//鐢ㄦ埛鏈櫥褰曪紝璇风櫥褰曞悗鎿嶄綔锛 + return false; + } + + ValueOperations ops = stringRedisTemplate.opsForValue(); + Object loginStatus = ops.get(token); + + + if( Objects.isNull(loginStatus)){ + response.getWriter().print("1");//token閿欒 + return false; + } + return true; + } + + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { + + } + + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { + + } + +} diff --git a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java index fa1c87f..b8409b6 100644 --- a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java +++ b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java @@ -437,6 +437,13 @@ public class UserInfoService { // List studentList = userInfoMapper.loginsGetStudentSchoolInfo(userId,schoolId); List studentList = userInfoMapper.loginsGetStudentSchoolInfo(userId,schoolId); obj.put("studentList",studentList); + + //閴存潈锛岀櫥褰曞悗灏嗕俊鎭瓨鍏edis + ValueOperations redis = stringRedisTemplate.opsForValue(); + String loginToken = UUID.randomUUID().toString(); + redis.set(loginToken,user.getUserName(),2, TimeUnit.HOURS); + obj.put("loginToken",loginToken); + resp.put("retcode", 200); resp.put("retvalue", obj); }else { @@ -543,6 +550,12 @@ public class UserInfoService { ValueOperations redis = stringRedisTemplate.opsForValue(); redis.set(token,lastLoginTime, 24, TimeUnit.HOURS); user.setDataTime(lastLoginTime); + + //閴存潈锛岀櫥褰曞悗灏嗕俊鎭瓨鍏edis + String loginToken = UUID.randomUUID().toString(); + redis.set(loginToken,user.getUserName(),2, TimeUnit.HOURS); + user.setLoginToken(loginToken); + resp.put("retvalue",user); resp.put("retcode", 200); } From a966e1ba7f9c84e7a377f4f34b560e19205788cb Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Fri, 4 Jun 2021 10:59:17 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=8B=A6=E6=88=AA=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yipin/liuwanr/config/AuthConfig.java | 36 +++++++++++++++---- .../resources/application-keda.properties | 7 ++++ .../resources/application-prod.properties | 7 ++++ .../resources/application-test.properties | 7 ++++ .../application-test_keda.properties | 7 ++++ 5 files changed, 57 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/config/AuthConfig.java b/src/main/java/com/yipin/liuwanr/config/AuthConfig.java index 376825b..a037081 100644 --- a/src/main/java/com/yipin/liuwanr/config/AuthConfig.java +++ b/src/main/java/com/yipin/liuwanr/config/AuthConfig.java @@ -1,20 +1,42 @@ package com.yipin.liuwanr.config; -/** - * @description - * @author: Mr.JK - * @create: 2021-06-03 16:24 - **/ + import com.yipin.liuwanr.filter.AuthInterceptor; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import java.util.List; + +/** + * @description + * @author: Mr.JK + * @create: 2021-06-03 16:24 + **/ @Configuration +@ConfigurationProperties(prefix = "auth") public class AuthConfig implements WebMvcConfigurer { + //寮鍚嫤鎴瓧绗︿覆 + public static String openInterceptStr; + + //鏀捐url + public static List permitUrl; + + @Value("${auth.openInterceptStr}") + public void setOpenInterceptStr(String openInterceptStr) { + AuthConfig.openInterceptStr = openInterceptStr; + } + + @Value("${auth.permitUrl}") + public void setPermitUrl(List permitUrl) { + AuthConfig.permitUrl = permitUrl; + } + @Bean public AuthInterceptor initAuthInterceptor(){ return new AuthInterceptor(); @@ -22,8 +44,8 @@ public class AuthConfig implements WebMvcConfigurer { @Override public void addInterceptors(InterceptorRegistry registry) { - registry.addInterceptor(initAuthInterceptor()).addPathPatterns("/**") - .excludePathPatterns("/userInfo/adminLogins/**","/userInfo/loginSchoolClient/**","/userInfo/logins/**","/userInfo/updateLogInNumber/**"); + registry.addInterceptor(initAuthInterceptor()).addPathPatterns(openInterceptStr) + .excludePathPatterns(permitUrl); } } \ No newline at end of file diff --git a/src/main/resources/application-keda.properties b/src/main/resources/application-keda.properties index fa02aba..751e510 100644 --- a/src/main/resources/application-keda.properties +++ b/src/main/resources/application-keda.properties @@ -47,3 +47,10 @@ spring.servlet.multipart.maxRequestSize=10240MB pagehelper.reasonable=false +#开启全局拦截,为空不开启拦截 +#auth.openInterceptStr= +auth.openInterceptStr=/** +#放行Url +auth.permitUrl=/userInfo/adminLogins/**,/userInfo/loginSchoolClient/**,/province/queryProvince/**,/city/queryCity/**,/customer/querySchool/**,/userInfo/queryPhone/** + + diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 7895a9e..4101d2a 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -47,3 +47,10 @@ spring.servlet.multipart.maxRequestSize=10240MB pagehelper.reasonable=false +#开启全局拦截,为空不开启拦截 +#auth.openInterceptStr= +auth.openInterceptStr=/** +#放行Url +auth.permitUrl=/userInfo/adminLogins/**,/userInfo/loginSchoolClient/**,/province/queryProvince/**,/city/queryCity/**,/customer/querySchool/**,/userInfo/queryPhone/** + + diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties index 3574706..e5f5ab9 100644 --- a/src/main/resources/application-test.properties +++ b/src/main/resources/application-test.properties @@ -47,3 +47,10 @@ spring.servlet.multipart.maxRequestSize=10240MB pagehelper.reasonable=false +#开启全局拦截,为空不开启拦截 +#auth.openInterceptStr= +auth.openInterceptStr=/** +#放行Url +auth.permitUrl=/userInfo/adminLogins/**,/userInfo/loginSchoolClient/**,/province/queryProvince/**,/city/queryCity/**,/customer/querySchool/**,/userInfo/queryPhone/** + + diff --git a/src/main/resources/application-test_keda.properties b/src/main/resources/application-test_keda.properties index a156057..9140623 100644 --- a/src/main/resources/application-test_keda.properties +++ b/src/main/resources/application-test_keda.properties @@ -47,3 +47,10 @@ spring.servlet.multipart.maxRequestSize=10240MB pagehelper.reasonable=false +#开启全局拦截,为空不开启拦截 +#auth.openInterceptStr= +auth.openInterceptStr=/** +#放行Url +auth.permitUrl=/userInfo/adminLogins/**,/userInfo/loginSchoolClient/**,/province/queryProvince/**,/city/queryCity/**,/customer/querySchool/**,/userInfo/queryPhone/** + + From a496c7b643bf5a4fb2efc93c911e28d425494006 Mon Sep 17 00:00:00 2001 From: yangjie <1179743470@qq.com> Date: Fri, 4 Jun 2021 11:52:59 +0800 Subject: [PATCH 7/9] user id --- src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java | 6 +++++- .../java/com/yipin/liuwanr/service/UserInfoService.java | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java b/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java index 414a255..5f53dca 100644 --- a/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java +++ b/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java @@ -36,7 +36,11 @@ public class AuthInterceptor implements HandlerInterceptor { ValueOperations ops = stringRedisTemplate.opsForValue(); Object loginStatus = ops.get(token); - + //userid + String userId = request.getParameter("userId"); + if (!StringUtils.isEmpty(userId)){ + return userId.equals(ops.get(token)); + } if( Objects.isNull(loginStatus)){ response.getWriter().print("1");//token閿欒 diff --git a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java index a98b568..12160c9 100644 --- a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java +++ b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java @@ -441,7 +441,7 @@ public class UserInfoService { //閴存潈锛岀櫥褰曞悗灏嗕俊鎭瓨鍏edis ValueOperations redis = stringRedisTemplate.opsForValue(); String loginToken = UUID.randomUUID().toString(); - redis.set(loginToken,user.getUserName(),2, TimeUnit.HOURS); + redis.set(loginToken,user.getUserId().toString(),2, TimeUnit.HOURS); obj.put("loginToken",loginToken); resp.put("retcode", 200); @@ -553,7 +553,7 @@ public class UserInfoService { //閴存潈锛岀櫥褰曞悗灏嗕俊鎭瓨鍏edis String loginToken = UUID.randomUUID().toString(); - redis.set(loginToken,user.getUserName(),2, TimeUnit.HOURS); + redis.set(loginToken,user.getUserId().toString(),2, TimeUnit.HOURS); user.setLoginToken(loginToken); resp.put("retvalue",user); From 379426bad0da4be47d1967ce344697891b6492da Mon Sep 17 00:00:00 2001 From: yangjie <1179743470@qq.com> Date: Fri, 4 Jun 2021 13:32:46 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E5=AF=B9=E6=89=80=E6=9C=89=E5=AD=98?= =?UTF-8?q?=E5=9C=A8userId=E7=9A=84=E8=AF=B7=E6=B1=82=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E9=89=B4=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yipin/liuwanr/filter/AuthInterceptor.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java b/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java index 5f53dca..8e68ef3 100644 --- a/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java +++ b/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java @@ -38,15 +38,16 @@ public class AuthInterceptor implements HandlerInterceptor { Object loginStatus = ops.get(token); //userid String userId = request.getParameter("userId"); - if (!StringUtils.isEmpty(userId)){ - return userId.equals(ops.get(token)); - } - if( Objects.isNull(loginStatus)){ response.getWriter().print("1");//token閿欒 return false; + }else { + if (!StringUtils.isEmpty(userId)){ + return userId.equals(loginStatus); + }else { + return false; + } } - return true; } @Override From b0f23e39b2198bc35d84235d817bc970775961a6 Mon Sep 17 00:00:00 2001 From: yangjie <1179743470@qq.com> Date: Fri, 4 Jun 2021 13:37:52 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E5=AF=B9=E6=89=80=E6=9C=89=E5=AD=98?= =?UTF-8?q?=E5=9C=A8userId=E7=9A=84=E8=AF=B7=E6=B1=82=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E9=89=B4=E6=9D=83,=20userId=E4=B8=BAnul=E6=88=96=E6=97=A0?= =?UTF-8?q?=E6=97=B6=E6=94=BE=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java b/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java index 8e68ef3..70caa25 100644 --- a/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java +++ b/src/main/java/com/yipin/liuwanr/filter/AuthInterceptor.java @@ -45,7 +45,7 @@ public class AuthInterceptor implements HandlerInterceptor { if (!StringUtils.isEmpty(userId)){ return userId.equals(loginStatus); }else { - return false; + return true; } } }