Java异常 #IllegalArgumentException: warning no match for this type name: com.wei.cloud.aop

1.异常现象

Caused by: java.lang.IllegalArgumentException: warning no match for this type name: com.wei.cloud.aop [Xlint:invalidAbsoluteTypeName]

Caused by: java.lang.IllegalArgumentException: warning no match for this type name: com.wei.cloud.aop [Xlint:invalidAbsoluteTypeName]
	at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:301)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:217)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch(AspectJExpressionPointcut.java:190)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:169)
	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:220)
	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:279)
	at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:311)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:119)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:89)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:70)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:346)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:298)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:423)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1633)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
	... 38 more

 

2.排查分析

此类型名称不匹配

参数非法:没有与类型匹配的参数

一般可能是类名、类路径哪里有问题,先确认一下。再就是写法可能哪里有问题。

 

3.解决方案

3.1.通配切入


@Pointcut("execution(public * com.weix.service..*ServiceImpl.*(..)) " +
       "|| execution(public * com.weix.service..*ManagerImpl.*(..))")
public void point() {
}

 

3.2.精准切入 

@Pointcut("execution(public * com.weix.service.im.impl.LcServiceImpl.sendMsg(..)) " +
       "|| execution(public * com.weix.service.im.impl.TxServiceImpl.sendMsg(..))")
public void sendMsg() {
}

 

你可能感兴趣的:(Java,Java异常,AOP)