zoukankan      html  css  js  c++  java
  • [aop报错] Cannot resolve reference to bean 'txPointCut' while setting bean property 'pointcut'

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Cannot resolve reference to bean 'txPointCut' while setting bean property 'pointcut'

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txPointCut': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.aop.aspectj.AspectJExpressionPointcut]: No default constructor found

    少了三个包(

    aspectjrt,
    aspectjweaver,
    com.springsource.org.aopalliance

    ),导入依赖即可

    <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjrt -->
    <dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjrt</artifactId>
    <version>1.9.6</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
    <dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjweaver</artifactId>
    <version>1.9.6</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.aopalliance/com.springsource.org.aopalliance -->
    <dependency>
    <groupId>org.aopalliance</groupId>
    <artifactId>com.springsource.org.aopalliance</artifactId>
    <version>1.0.0</version>
    </dependency>
  • 相关阅读:
    修改代码的艺术阅读笔记-01
    周总结
    代码整洁之道阅读笔记-03
    周总结
    mybatis三种执行器性能比较
    Tomcat长连接是如何实现的
    Zookeeper在Windows下搭建集群教程
    Zookeeper单机模式下RequestProcessor流程与源码理解
    JDK NIO基础概念与原理
    zookeeper客户端访问服务端时,基于NIO的线程池绑定
  • 原文地址:https://www.cnblogs.com/returnZero/p/14280644.html
Copyright © 2011-2022 走看看