Skip to content

Commit e8ffeed

Browse files
authored
Update README.md
1 parent 0076532 commit e8ffeed

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,70 @@ The system uses the open source `KindEditor` rich text editor, which is a set of
6666
- Scalable: plug-in-based design, all functions are plug-ins, and functions can be increased or decreased according to needs
6767
- Easy to change style: easy to modify the editor style, just modify one CSS file
6868
- Compatible for major browsers: Support most major browsers, such as IE, Firefox, Safari, Chrome, Opera
69+
70+
![image](https://user-images.githubusercontent.com/44923423/179390335-ad090db6-4ce8-4595-91f0-62d85b8d647a.png)
71+
72+
### Related information
73+
74+
The information of the associated object, click to display in the form of a pop-up window, if you have the modification permission corresponding to the module, you can also maintain the information here.
75+
76+
![image](https://user-images.githubusercontent.com/44923423/179390372-31fc5018-e856-4f24-aafb-d1d1fa7e043c.png)
77+
78+
### Search box
79+
80+
You can select query conditions in the search box in the upper right corner and enter keywords to perform fuzzy search of corresponding information.
81+
82+
![image](https://user-images.githubusercontent.com/44923423/179390389-705c591d-3294-4b30-94d2-769cbabde7ea.png)
83+
84+
### Session expired jump to login
85+
86+
After the user logs in, the corresponding session will be established. The default expiration time of the system is 10 minutes. If you need to change it, you can change the following configuration in the applicationContextshiro.xml configuration file.
87+
88+
```{xml}
89+
<!-- 会话管理器 -->
90+
91+
<bean id="sessionManager" class="org.apache.shiro.web.session.mgt.D
92+
93+
efaultWebSessionManager"> <!-- session的失效时长,单位毫秒 ,这里设置为10分钟-->
94+
95+
<property name="globalSessionTimeout" value="600000"/>
96+
97+
<!-- 删除失效的session -->
98+
99+
<property name="deleteInvalidSessions" value="true"/>
100+
101+
<!-- 指定本系统sessionId, 默认为: JSESSIONID 问题: 与Servlet容器名冲 突, 如Jetty, Tomcat等默认JSESSIONID,
102+
103+
当跳出shiro Servlet时如Error-page容器会为JSESSIONID重新分配值导致 登录会话丢失! -->
104+
105+
<property name="sessionIdCookie" ref="sessionIdCookie"/>
106+
107+
</bean>
108+
```
109+
110+
If the session expires, you should jump to the login interface to log in again. The method adopted by the system is to set a session filter, as follows:
111+
```{java}
112+
public class SessionFilter implements Filter {
113+
114+
public void doFilter(ServletRequest servletRequest, ServletResp onse servletResponse, FilterChain filterChain) throws IOException, ServletException {
115+
116+
HttpServletRequest request = (HttpServletRequest) servletRe
117+
118+
quest;
119+
120+
HttpServletResponse response = (HttpServletResponse) servle tResponse;
121+
122+
if (!SecurityUtils.getSubject().isAuthenticated()) { //判断session里是否有用户信息,且是否为ajax请求,如果是ajax请求 响应头会有,x-requested-with if (request.getHeader("x-requested-with") != null && request.getHeader("x-requested-with").equals IgnoreCase("XMLHttpRequest")) { response.setHeader("session-status", "timeout");//在 响应头设置session状态 }
123+
124+
}
125+
126+
filterChain.doFilter(request, servletResponse);
127+
128+
}
129+
130+
@Override public void destroy() { // TODO Auto-generated method stub }
131+
132+
@Override public void init(FilterConfig arg0) throws ServletException { // TODO Auto-generated method stub }
133+
134+
}
135+
```

0 commit comments

Comments
 (0)