Using Springdoc with Spring Boot 3 Native
I am trying to use Springdoc v2 with Spring Boot 3. It works fine when running it with the JVM, but not when running the native binary.
The Spring boot project is created like this: https://start.spring.io/#!type=maven-project&language=java&platformVersion=3.0.0&packaging=jar&jvmVersion=17&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo&dependencies=native,web,lombok
I've added the Springdoc dependency:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.0.0</version>
</dependency>
Starting the jar file, I can browse http://localhost:8080/sw开发者_如何学Pythonagger-ui/index.html, but when I run the native binary, I get a 404.
According to the documentation, it seems to support it out of the box: https://springdoc.org/v2/
精彩评论