• error Type referred to is not an annotation type


    项目报错:如下

    Caused by: java.lang.IllegalArgumentException: error Type referred to is not an annotation type: com$mr$annotation$RedisCache
    	at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:319)
    	at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:227)
    	at org.springframework.aop.aspectj.AspectJExpressionPointcut.obtainPointcutExpression(AspectJExpressionPointcut.java:198)
    	at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:177)
    	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:225)
    	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:288)
    	at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:320)
    	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:126)
    	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:95)
    	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:76)
    	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:349)
    	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:301)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:434)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1749)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576)
    	... 41 common frames omitted
    Disconnected from the target VM, address: '127.0.0.1:61338', transport: 'socket'
    

    很大原因是因为路径写错了,我使用的Redis缓存,自定义一个注解,然后aop切得时候路径错了,改正确即可:
    在这里插入图片描述

    世界上所有的不公平都是由于当事人能力不足造成的.
  • 相关阅读:
    docker参数--restart=always的作用
    docker参数expose使用
    Linux主机添加路由和端口转发
    docker自动开启端口转发功能
    【Tips】【UE】总结自己常用的UltraEdit使用技巧
    浅谈I2C总线
    I2C总线简介(很经典)
    ECN
    视频编码未来简史
    爬虫与反爬虫
  • 原文地址:https://www.cnblogs.com/javayida/p/13346863.html
Copyright © 2020-2023  润新知