From f493afbebd8ba7ee9d19e406ce4ace2fa01543ac Mon Sep 17 00:00:00 2001 From: limqhz Date: Fri, 27 Aug 2021 15:00:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9shiro=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E5=99=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/mybatis/RequestSearchPlugin.java | 9 +++--- oms/src/main/resources/logback.xml | 28 +++++++++---------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/oms/src/main/java/com/ydd/oms/config/mybatis/RequestSearchPlugin.java b/oms/src/main/java/com/ydd/oms/config/mybatis/RequestSearchPlugin.java index 0a44219..36f8479 100644 --- a/oms/src/main/java/com/ydd/oms/config/mybatis/RequestSearchPlugin.java +++ b/oms/src/main/java/com/ydd/oms/config/mybatis/RequestSearchPlugin.java @@ -46,15 +46,14 @@ public class RequestSearchPlugin implements Interceptor { @Override public Object intercept(Invocation invocation) throws Throwable { - Method method = invocation.getMethod(); - logger.info("method is " + method.getName()); - if ("findByAccount".equals(method.getName())){ - return invocation.proceed(); - } // 准备参数 Executor executor = (Executor) invocation.getTarget(); Object[] args = invocation.getArgs(); MappedStatement ms = (MappedStatement) args[0]; + logger.info("query by intercept Id is {}",ms.getId()); + if ("com.ydd.oms.mapper.sys.AdminMapper.findByAccount".equals(ms.getId())){ + return invocation.proceed(); + } Object parameter = args[1]; BoundSql boundSql; //由于逻辑关系,只会进入一次 diff --git a/oms/src/main/resources/logback.xml b/oms/src/main/resources/logback.xml index 80e88d0..cc1d16f 100644 --- a/oms/src/main/resources/logback.xml +++ b/oms/src/main/resources/logback.xml @@ -49,21 +49,19 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + +