You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何设置JVM选项解决Spring Boot 2.0.0.RC1非法反射访问错误

Fixing Illegal Reflection Access Error in Spring Boot 2.0.0.RC1 with JDK 9

Hey there, let's get that annoying org.springframework.cglib.core.ReflectUtils$1 illegal reflection access error sorted out. Here's exactly what you need to do in IntelliJ IDEA:

  1. Edit the VM Options File
    You've already opened Help > Edit Custom VM Options—great start! This will open either idea.vmoptions or idea64.vmoptions depending on your system architecture.

  2. Add the Required JVM Flag
    Scroll to the end of the file and add this line (make sure to use two hyphens, not one):

    --illegal-access=deny
    

    This overrides Java 9's default permit setting for illegal reflection access, which aligns with the Spring team's recommendation to resolve the known issue in Spring Boot 2.0.0.RC1 (and Spring Framework 5.0.3.RELEASE).

  3. Restart IDEA
    Save the file, then close and reopen IntelliJ IDEA. The new VM option will take effect on restart.

A quick note: Once you upgrade to a stable release of Spring Boot (like 2.0.0.RELEASE or later), this issue should be fully resolved, so you can remove this flag if you want.

内容的提问来源于stack exchange,提问作者Fiyaz Hasan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:28:18