spring aop jdk1.5 Wrong number of type parameters supplied

Wrong number of type parameters supplied

经过对 aspectjwearver 1.5.0 源码分析

TypeVariable[] typeVariables = getDeclaringType().getTypeVariables();
        if (isParameterized && (typeVariables.length != typeParameters.length)) {
            throw new IllegalStateException("Wrong number of type parameters supplied");
        }

 

接口的泛型参数个数和实现类的 个数不一致 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Spring AOP中的JDK动态代理是一种实现动态代理的方式。它通过使用JDK的Proxy类和InvocationHandler接口来生成代理对象和处理代理逻辑。具体来说,当我们使用Spring AOP时,代理对象的生成直接使用了JDK动态代理的Proxy.newProxyInstance方法。而代理逻辑则是通过实现了InvocationHandler接口的invoke方法来实现的。在Spring AOP中,JdkDynamicAopProxy类实现了InvocationHandler接口,并完成了Spring AOP拦截器链拦截等一系列逻辑。通过JdkDynamicAopProxy的invoke方法,我们可以在目标方法执行前后添加额外的逻辑。这种方式的优点是可以在运行时动态地生成代理对象,不需要事先编写代理类的代码。这样可以更加灵活地实现横切关注点的功能,并且可以避免代码冗余。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Spring AOP --JDK动态代理方式](https://blog.csdn.net/m0_46195271/article/details/108714116)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [SpringAOP JDK动态代理](https://blog.csdn.net/weixin_46281472/article/details/125629339)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值