forked from github/dataease
Merge pull request #8689 from dataease/pr@dev@perf_shiro_log
perf: 尝试减少shiro日志
This commit is contained in:
commit
0e359e54c8
@ -92,8 +92,7 @@ public class JWTFilter extends BasicHttpAuthenticationFilter {
|
||||
|
||||
if (isLoginAttempt(request, response) || ApiKeyHandler.isApiKeyCall(hRequest)) {
|
||||
try {
|
||||
boolean loginSuccess = executeLogin(request, response);
|
||||
return loginSuccess;
|
||||
return executeLogin(request, response);
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e);
|
||||
if (e instanceof AuthenticationException && StringUtils.equals(e.getMessage(), expireMessage)) {
|
||||
|
@ -2,7 +2,9 @@ package io.dataease.controller.handler;
|
||||
|
||||
import io.dataease.controller.ResultHolder;
|
||||
import io.dataease.i18n.Translator;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.web.servlet.error.ErrorAttributes;
|
||||
import org.springframework.boot.web.servlet.error.ErrorController;
|
||||
@ -49,7 +51,7 @@ public class GlobalExceptionHandler implements ErrorController {
|
||||
response.setStatus(code);
|
||||
String errorMessage = StringUtils.EMPTY;
|
||||
if (t != null) {
|
||||
if (Logger.isDebugEnabled()) {
|
||||
if (Logger.isDebugEnabled() && (ObjectUtils.isEmpty(t.getCause()) || !(t.getCause() instanceof AuthenticationException))) {
|
||||
Logger.error("Fail to proceed " + errorAttributeMap.get("path"), t);
|
||||
}
|
||||
errorMessage = t.getMessage();
|
||||
|
@ -81,6 +81,7 @@ server.servlet.context-parameters.configurationStrategy=SYSTEM_PROPERTIES
|
||||
server.servlet.session.cookie.http-only=true
|
||||
server.servlet.session.tracking-modes=cookie
|
||||
spring.jackson.parser.allow-numeric-leading-zeros=true
|
||||
logging.level.org.apache.shiro=OFF
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user