zoukankan      html  css  js  c++  java
  • jdk11+ spring5+ 报反射错误的屏蔽方法

    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/D:/mvnRepos/org/springframework/spring-core/5.0.8.RELEASE/spring-core-5.0.8.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
    WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$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
    

    In JDK 11+, add the following option to the JVM to disable the warning from Spring's use of CGLIB:

    --add-opens java.base/java.lang=ALL-UNNAMED for example:

    java --add-opens java.base/java.lang=ALL-UNNAMED -jar target/*.jar No need to report it; it's a known Spring bug.

    This happens because the new JDK 11+ module system detected an illegal access that will be disallowed sometime in the (near) future. You can read more about the JDK 9 Module system here.

    Update:

    A fix for this issue is available JDK 11+ with Spring 5.1+.

  • 相关阅读:
    log4js日志
    webservice随记
    easyui+nodejs+sqlserver增删改查实现
    jsp、servlet笔记
    mysql随笔
    ssh登录实现
    UML和模式应用1: 面向对象的分析与设计
    Linux mmc framework2:基本组件之mmc
    Linux MMC framework2:基本组件之core
    Linux mmc framework2:基本组件之queue
  • 原文地址:https://www.cnblogs.com/xiami2046/p/13857604.html
Copyright © 2011-2022 走看看