Skip to content

Commit 63c911d

Browse files
committed
注释
1 parent 3789c74 commit 63c911d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

core/src/main/java/info/xiaomo/core/filter/CORSFilter.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,27 @@
2222
**/
2323
@Component
2424
public class CORSFilter implements Filter {
25+
26+
27+
/**
28+
* 初始化
29+
*
30+
* @param filterConfig filterConfig
31+
* @throws ServletException
32+
*/
2533
@Override
2634
public void init(FilterConfig filterConfig) throws ServletException {
2735

2836
}
2937

38+
/**
39+
* CORS 过滤器
40+
* @param req rq
41+
* @param res res
42+
* @param chain chin
43+
* @throws IOException
44+
* @throws ServletException
45+
*/
3046
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
3147
HttpServletResponse response = (HttpServletResponse) res;
3248
response.setHeader("Access-Control-Allow-Origin", "*");
@@ -36,6 +52,10 @@ public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
3652
chain.doFilter(req, res);
3753
}
3854

55+
56+
/**
57+
* 销毁对象
58+
*/
3959
public void destroy() {
4060
}
4161
}

0 commit comments

Comments
 (0)