AOP中出现如下错误
Exception in thread “main” java.lang.ClassCastException: com.sun.proxy.$Proxy7 cannot be cast to com.paul.aop.CalculatorImpl
#解决办法:
动态代理的对象一定要是接口,而不是实现类!
AOP中出现如下错误
Exception in thread “main” java.lang.ClassCastException: com.sun.proxy.$Proxy7 cannot be cast to com.paul.aop.CalculatorImpl
#解决办法:
动态代理的对象一定要是接口,而不是实现类!