zoukankan      html  css  js  c++  java
  • 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切得时候路径错了,改正确即可:
    在这里插入图片描述

    世界上所有的不公平都是由于当事人能力不足造成的.
  • 相关阅读:
    js休眠
    CentOS6.3安装Mysql-5.5.29
    轻量级应用开发之(11)手势
    Git Pull 避免用户名和密码方法
    Ubuntu学习总结-03 安装软件 & 技巧
    Ubuntu学习总结-06 安装 Nginx
    轻量级应用开发之(09)创建控制器
    轻量级应用开发之(10) UINavigationController导航控制器
    轻量级应用开发之(08)程序启动原理
    Ubuntu学习总结-01 安装Ubuntu
  • 原文地址:https://www.cnblogs.com/javayida/p/13346863.html
Copyright © 2011-2022 走看看