问题描述:
在使用spring-ioc基于子类的动态代理时遇到:
Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @5c29bfd
解决:
大概是因为jdk版本的问题,所以需要在configuration中加入:
--add-opens java.base/java.lang=ALL-UNNAMED
加上后问题顺利解决!