1.Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available.

解决方法:在配置文件中添加

     <aop:aspectj-autoproxy expose-proxy="true"/>
<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
<property name="proxyTargetClass" value="true"/>
</bean>

pom.xml中添加aop相关jar包

        <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>

java 坑总结的更多相关文章

  1. 初入Java坑,然后又入产品坑

    之前工作了一年,从事Java相关工作,不小心深得领导器重,跑去演讲.写文档.与客户沟通等,最后应公司需要,转往产品坑,坑坑相连,何时逃坑. 最近一直在学习产品经理必备工具Axure,发现这真是一个神奇 ...

  2. java坑之无法创建线程

    环境:linux 错误:java.lang.OutOfMemoryError: unable to create new native thread 原因:OS对线程是有限制 解决办法: 在Linux ...

  3. Java坑一

    public class Test { public static void main(String[] args) { Integer a = 12; Integer b = 12; System. ...

  4. java 坑

    时间戳 unix的时间戳和java中的是不同的.unix为10位,java的13位.需要进行转换. long timestamps = 1509783992L; long javaTimstamps ...

  5. 一个奇妙的java坑:Long 类型的比较

    Long userId=127L; Long authorId=127L; System.out.println(userId==authorId);//true userId=128L; autho ...

  6. 新手上路之如何选择Java版本

    @ 目录 LTS与非LTS LTS 非LTS Java CPU与PSU Java SE.Java EE.Java ME的区别 Java SE Java EE Java ME 每一次JDK上新总有一群人 ...

  7. 10天,从.Net转Java,并找到月薪2W的工作(三)

    放弃Offer之后,压力一天比一天打 好点的公司,除了技术追根问底,还对你平时代码实践问的很多.比如问你,redis缓存一般设置多大.问你项目内容的细节,业务流程. 集合.锁.Jvm.多线程高并发.微 ...

  8. DES & 3DES 加密算法

    JAVA坑 跟其他公司java的对接口,一个细节对到吐血,具体: DesUtil.java(别人的反例) //package base_class; import java.io.IOExceptio ...

  9. Mybatis Dynamic Query 2.0.2

    项目地址:https://github.com/wz2cool/mybatis-dynamic-query 文档地址:https://wz2cool.gitbooks.io/mybatis-dynam ...

随机推荐

  1. 码云Gitee上新建项目教程

    1.在浏览器访问,https://gitee.com/: 2.使用用户名.密码登录: 3.在左下角显示当前用户的项目,点击“+”号,创建项目: 4.填写项目的相关信息,项目名称要和本地要上传的项目名称 ...

  2. 第三方deepvoice3_pytorch安装使用

    项目地址:https://github.com/r9y9/deepvoice3_pytorch 解决两个问题:一使用外部数据集训练,二加载pre-trained模型做fine-tune 1:安装必要依 ...

  3. php的运行模式

    1.php最常见的五种运行模式. CGI 通用网关接口 FastCGI 常驻内存的CGI CLI 命令行 Web模块  Apache等Web服务器 模块的形式加载php进程 ISAPI 已经不用了

  4. JS和CSS交互的方法

    用JavaScript获取伪元素(pseudo-element)属性  var  color=window.getComputedStyle( document.querySelector('.ele ...

  5. bootstrapvalidator的简单校验【必填校验、长度校验、是否存在校验(remote)】

    需求:输入框的"供应商编码"不能为空而且不能与数据库重复,供应商名称不能为空. 解决: 1.input如下 <input id="ssupplierNo" ...

  6. kubenetes服务发现

    一.基于 iptables 的 Service 实现 Pod的ip地址不是固定了.Service通过selector属性和后端Pod关联,被selector选中的Pod被称为Service的Endpo ...

  7. Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class

    Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb ...

  8. 彻底搞懂Scrapy的中间件(一)

    中间件是Scrapy里面的一个核心概念.使用中间件可以在爬虫的请求发起之前或者请求返回之后对数据进行定制化修改,从而开发出适应不同情况的爬虫. "中间件"这个中文名字和前面章节讲到 ...

  9. Django2.X报错-------ModuleNotFoundError: No module named 'django.core.urlresolvers'

    django2.0 把原来的 django.core.urlresolvers 包 更改为了 django.urls包.所以将导入的包修改为django.urls.

  10. 回溯法 Generate Parentheses,第二次总结

    class Solution { public: vector<string> ans; void helper(string& cur, int left, int right, ...