Exception in thread "main" java.lang.ClassCastException: com.sun.proxy.$Proxy0 cannot be cast to *

JDK动态代理代理的是接口,因此在获取被代理对象实例时,强制转换应该转换为接口(用接口接收)。