Skip to content

"springdoc.*.enable" option overwrite with --spring.config.location not work with Graalvm native build #3044

@HyoKImAbsolut

Description

@HyoKImAbsolut

Describe the bug
"springdoc.*.enable" option overwrite with --spring.config.location not work with Graalvm native build

with a brand new springboot project with springdoc, the jar package work fine with external application.yaml, in which I want to disable swagger UI and apiDoc.

But when it comes to nativeBuild, the option cannot be overwritten. The UI is still accessable, so as the apidoc.

As I said, the only difference is the mode (jar / nativeBuild).

Btw, the springboot properties like "server.port" works perfectly with both jar/native mode. So till now, the problem is only shown on SpringDoc properties.

To Reproduce
Here I provide a demo project package in the archive file.

to reproduce:
1.run ./gradlew nativeCompile
2.cd build/native/nativeCompile
3../demo --spring.config.location=../../../application.yaml

You can see the port is modified to 8081, but it's not working with the springdoc options.

as comparation:
1.run ./gradlew bootJar
2.cd build/libs
3.java -jar demo-0.0.1-SNAPSHOT.jar --spring.config.location=../../application.yaml

归档.zip
You can see the port is modified to 8081, and the swagger ui is disabled correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions