Exception in thread “main” java.lang.ClassCastException: com.sun.proxy.$Proxy13 cannot be cast to CustomeClass
问题 I am trying to learn AOP with Spring Framework, but there is one exception that keeps on getting invoked. Error : Exception in thread "main" java.lang.ClassCastException: com.sun.proxy.$Proxy13 cannot be cast to com.controller.Triangle Shape.java package com.controller; public interface Shape { public void draw(); } Triangle.java package com.controller; import org.springframework.stereotype.Component; @Component public class Triangle implements Shape { public void draw() { System.out.println(