How do I set up run.json for spring boot project?

Answered

{
    "configurations": [
        ...,
        {
            "name": "AppUI",
            "type": "spring-boot",
            "activeProfiles": ["local", "random"],
            "debugMode": true,
            "mainClass": "com/example/App.java",
            "module": "AppUI",
        }
    ]
}

 

Currently, I'm receiving the following error:

Unrecognized option: --module
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

0
2 comments

In the Spring boot project type when Smart mode is enabled, IDE will recognize the main Spring boot class and gives the option to run it right from the left side (the gutter):

Does this work for you?

If not, could you clarify - do you use Gradle or Maven in project? Can you provide a project to check?

-1

使用 Smart mode 运行 Spring boot 会报 错误: 找不到或无法加载主类 "-Dmanagement.endpoints.jmx.exposure.include=*"

3

Please sign in to leave a comment.