⬆️ fastjson v2
This commit is contained in:
parent
38e0178af9
commit
007ab5d3aa
6
pom.xml
6
pom.xml
@ -101,7 +101,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
<version>1.2.79</version>
|
<version>2.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- shiro权限控制框架 -->
|
<!-- shiro权限控制框架 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -241,6 +241,10 @@
|
|||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.json</groupId>
|
||||||
|
<artifactId>json</artifactId>
|
||||||
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package com.rymcu.forest.config;
|
|||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
import com.rymcu.forest.core.result.GlobalResultGenerator;
|
import com.rymcu.forest.core.result.GlobalResultGenerator;
|
||||||
import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
|
import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -51,7 +52,7 @@ public class ShiroLoginFilter extends FormAuthenticationFilter {
|
|||||||
httpServletResponse.setCharacterEncoding("UTF-8");
|
httpServletResponse.setCharacterEncoding("UTF-8");
|
||||||
httpServletResponse.setHeader("sessionstatus", "timeOut");
|
httpServletResponse.setHeader("sessionstatus", "timeOut");
|
||||||
httpServletResponse.addHeader("loginPath", this.getLoginUrl());
|
httpServletResponse.addHeader("loginPath", this.getLoginUrl());
|
||||||
httpServletResponse.getWriter().write(JSONObject.toJSONString(GlobalResultGenerator.genErrorResult("未登录或已登录超时,请重新登录"),true));
|
httpServletResponse.getWriter().write(JSONObject.toJSONString(GlobalResultGenerator.genErrorResult("未登录或已登录超时,请重新登录"), SerializerFeature.PrettyFormat));
|
||||||
return false;
|
return false;
|
||||||
}else {
|
}else {
|
||||||
if (log.isTraceEnabled()) {
|
if (log.isTraceEnabled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user