weixin-popular icon indicating copy to clipboard operation
weixin-popular copied to clipboard

ontent:WARNING: An illegal reflective access operation has occurred

Open wzhjqeds opened this issue 3 years ago • 0 comments

 public static void main(String[] args) {
        Unifiedorder unifiedorder = new Unifiedorder();
        unifiedorder.setSign("a");
        String unifiedorderXML = XMLConverUtil.convertToXML(unifiedorder);
        System.out.println(unifiedorderXML);
    }

环境:java14,以上代码执行会报警告:

content:WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1 (jar:file:/app/app.jar!/BOOT-INF/lib/jaxb-impl-2.1.12.jar!/) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

wzhjqeds avatar Dec 16 '20 12:12 wzhjqeds