AOP原理

<aop:aspectj-autoproxy />声明自动为spring容器中那些配置@aspectJ切面的bean创建代理,织入切面。

<aop:aspectj-autoproxy />的proxy-target-class属性,默认为false,表示使用jdk动态代理织入增强。当配为<aop:aspectj-autoproxy  poxy-target-class="true"/>时,表示使用CGLib动态代理技术织入增强。如果proxy-target-class设置为false,但是目标类没有声明接口,则spring将自动使用CGLib动态代理。

解决方法

把<aop:aspectj-autoproxy/> 修改成<aop:aspectj-autoproxy proxy-target-class="true"/>

Bean named 'XXX' is expected to be of type [XXX] but was actually of type [com.sun.proxy.$Proxy7的更多相关文章

  1. Spring错误之org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'bookService' is expected to be of type 'pw.fengya.tx.BookService' but was actually of type 'com.sun.proxy.$Proxy1

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cas ...

  2. Bean named '...' is expected to be of type [...] but was actually of type [com.sun.proxy.$Proxy7解决方法

    报错 三月 07, 2017 8:09:52 下午 org.springframework.context.support.ClassPathXmlApplicationContext prepare ...

  3. Springboot2.x 启动报错:Bean named 'xxxService'... but was actually of type 'com.sun.proxy.$Proxy82'

    Springboot 2.0.5 搭建一个新项目启动后报错:Bean named 'xxxService'... but was actually of type 'com.sun.proxy.$Pr ...

  4. 解决BeanNotOfRequiredTypeException: Bean named 'XXX' must be of type XXX, but was actually of type XXX问题

    Java新手,困扰了一下午. 发布时总是报这样一个错误. org.springframework.beans.factory.BeanCreationException: Error creating ...

  5. No bean named 'xxxxx' is defined异常,已解决,这个坑很难发现,你get了吗

    出现No bean named 'xxxxx' is defined异常 没有定义名为xxx的bean 如果你的代码写的都对,根本问题只有一个地方出错了,那就是你的 basePackage=的包名路径 ...

  6. spring注入时报错::No qualifying bean of type 'xxx.xxMapper'

    做一个小项目,因为有 baseService,所以偷懒就没有写单独的每个xxService接口,直接写的xxServiceImpl,结果在service实现类中注入Mapper的时候,用的 @Auto ...

  7. Spring:No bean named 'beanScope' is defined

    初学Spring,“No bean named 'beanScope' is defined”这个问题困扰了我好几个小时,查资料无果后,重写好几遍代码后发现问题居然是配置文件不能放在包里...要放在s ...

  8. No bean named 'transactionManager' is defined

    2016-10-20 23:27:17.771 INFO 7096 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped &quo ...

  9. 开发错误日志之No matching bean of type [xxx] found for dependency

    No matching bean of type [org.springframework.data.mongodb.core.MongoTemplate] found for dependency ...

  10. org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSessionRepositoryFilter' is defined

    spring-session 集成redis,web.xml配置filter时候出现  No bean named 'springSessionRepositoryFilter' is defined ...

随机推荐

  1. HttpClient 连接泄漏问题

    AbstractConnPool.java 提交记录 https://github.com/apache/httpcomponents-core/commits/4.4.x/httpcore/src/ ...

  2. 使用uiautomator2自动化测试app(二)------操作篇

    提示: 1. 推荐使用python3以上的版本来进行开发 2. 手机使用安卓手机,版本最好不要太老,一根数据线 3. 安装虚拟机(博主使用雷电) 操作: 这里只简单的介绍一些uiautomator2的 ...

  3. git 执行 git reset HEAD 报 Unstaged changes after reset

    Unstaged changes after reset 解决的办法如下2中办法: 1. git add . git reset --hard   2. git stash git stash dro ...

  4. 通过mitmproxy爬取APP的数据

    安装: https://mitmproxy.org/ 小米安装证书 设置->系统安全->从存储设备安装->选择*.pem文件 模拟器安装证书 (请从C:\Users\John\.mi ...

  5. 坐标转换7参数计算工具——arcgis 地理处理工具案例教程

    坐标转换7参数计算工具--arcgis 地理处理工具案例教程 商务合作,科技咨询,版权转让:向日葵,135-4855_4328,xiexiaokui#qq.com 不接受个人免费咨询. 提供API,独 ...

  6. Git Bash 克隆project

    cd 到想要的路径,然后执行下面的命令

  7. 2019年MTP管理技能提升培训笔记

    2019年MTP管理技能提升培训笔记 管理专题培训–MTP管理技能提升培训 高水准的问题分析解决 何为高水准 高 多层探寻,高度分析,即需要有深度 水 团队讨论,水平思考,即需要有广度 准 预防应变, ...

  8. 【C++】C++ 左值、右值、右值引用详解

    左值.右值 在C++11中所有的值必属于左值.右值两者之一,右值又可以细分为纯右值.将亡值.在C++11中可以取地址的.有名字的就是左值,反之,不能取地址的.没有名字的就是右值(将亡值或纯右值).举个 ...

  9. Kafka安装教程(详细过程)

    安装前期准备: 1,准备三个节点(根据自己需求决定) 2,三个节点上安装好zookeeper(也可以使用kafka自带的zookeeper) 3,关闭防火墙 chkconfig  iptables o ...

  10. nginx https 转发

    add_header Content-Security-Policy upgrade-insecure-requests;