Skip to content

Conversation

@DongJu-Na
Copy link

This PR adds a new demo module: demo-spring-webmvc-nonboot.

It addresses issue #67 by providing a working sample for using
springdoc-openapi in a classic Spring Web MVC application without
a Spring Boot application class.

Highlights

  • New module demo-spring-webmvc-nonboot (WAR packaging)
  • DispatcherServlet configured via web.xml
  • Java config OpenApiConfiguration:
    • enables @EnableWebMvc
    • imports SpringDocConfiguration, SpringDocWebMvcConfiguration,
      SwaggerConfig and JacksonAutoConfiguration
    • explicitly registers a SpringDocConfigProperties bean
  • Sample HelloController exposing GET /api/hello
  • Module-level README describing how to build and deploy the demo

The demo was verified locally by deploying the generated WAR
to a Servlet container and accessing:

  • /v3/api-docs
  • /swagger-ui/index.html
  • /api/hello

Fixes #67.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide sample configurations for spring project (not spring boot)

2 participants