parent
2c522657e5
commit
5d6f846420
|
@ -16,9 +16,15 @@ public class ApiKeyFilter extends AnonymousFilter {
|
||||||
@Override
|
@Override
|
||||||
protected boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) {
|
protected boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) {
|
||||||
try {
|
try {
|
||||||
HttpServletRequest httpServlet = WebUtils.toHttp(request);
|
try{
|
||||||
String url = httpServlet.getRequestURL().toString();
|
//这部分代码是为了测试打包完成之后能否访问文档相关路径,封版之前要删除
|
||||||
LogUtil.info("Url message : "+url);
|
HttpServletRequest httpServlet = WebUtils.toHttp(request);
|
||||||
|
String url = httpServlet.getRequestURL().toString();
|
||||||
|
LogUtil.info("Url message : "+url);
|
||||||
|
}catch (Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (!SecurityUtils.getSubject().isAuthenticated()) {
|
if (!SecurityUtils.getSubject().isAuthenticated()) {
|
||||||
String userId = ApiKeyHandler.getUser(WebUtils.toHttp(request));
|
String userId = ApiKeyHandler.getUser(WebUtils.toHttp(request));
|
||||||
if (StringUtils.isNotBlank(userId)) {
|
if (StringUtils.isNotBlank(userId)) {
|
||||||
|
|
Loading…
Reference in New Issue