@Around("execution(* com.jeecms.mybatis.service.MybatisDeviceService.*(..)) ")
public Object around2(ProceedingJoinPoint point) throws Throwable
{
DynamicDataSource.setDataSource("second");
try
{
return point.proceed();
}
finally
{
DynamicDataSource.clearDataSource();
}
}
@Around("execution(* com.jeecms.front.controller.business.TestController*.*(..))")
public Object run1(ProceedingJoinPoint joinPoint) throws Throwable
{
//获取方法参数值数组
Object[] args = joinPoint.getArgs();
//得到其方法签名
MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
//获取方法参数类型数组
Class[] paramTypeArray = methodSignature.getParameterTypes();
return null;
}
路径都是对的,但是拦截不到controller