springdoc/springdoc-openapi-demos
关于
使用 spring-boot 的 OpenAPI 3 示例
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文🎮 Live demos and sample applications for springdoc-openapi
📖 Documentation · 📦 springdoc-openapi · 🚀 Getting started · ⚙️ Properties · ❓ FAQ
💖 Sponsored by
If you ❤️ springdoc-openapi, become a sponsor: it covers the project expenses and helps it grow.
This repository holds the demo applications of springdoc-openapi:
small Spring Boot applications that show how springdoc-openapi documents Web MVC, WebFlux, Spring Cloud and
MCP applications. Every push to master builds them and deploys the public ones, so you can try them right
now in your browser. ✨
🌐 Live demos
| Demo | What it shows | Try it | Source |
|---|---|---|---|
| 🍃 Web MVC | A Spring Web MVC API documented with Swagger UI | ▶️ Open | 📂 |
| ⚡ WebFlux | A reactive Spring WebFlux API documented with Swagger UI | ▶️ Open | 📂 |
| 🎨 Web MVC and Scalar | The Web MVC demo with the Scalar API reference | ▶️ Open | 📂 |
| 🎨 WebFlux and Scalar | The WebFlux demo with the Scalar API reference | ▶️ Open | 📂 |
| 🔀 WebFlux functional endpoints | Router functions documented with springdoc's SpringdocRouteBuilder |
▶️ Open | 📂 |
| 🔗 Spring HATEOAS | Hypermedia APIs with HAL links | ▶️ Open | 📂 |
| ☁️ Spring Cloud Function, Web MVC | Functions exposed as REST endpoints | ▶️ Open | 📂 |
| ☁️ Spring Cloud Function, WebFlux | Reactive functions exposed as REST endpoints | ▶️ Open | 📂 |
| 🚪 Microservices | Spring Cloud Gateway, Eureka and Config, with the API docs of every service in one Swagger UI | ▶️ Open | 📂 |
| 🤖 MCP server | Spring AI MCP Server: REST endpoints exposed as MCP tools for AI agents, with an MCP UI | ▶️ Open | 📂 |
| 🔐 MCP authorization server | The OAuth 2 authorization server that secures the MCP demo | ▶️ Open | 📂 |
[!TIP] The demos run on Cloud Run and scale to zero: the first request after a quiet period can take a few seconds. ⏳
📦 More samples
These samples are not deployed, but you can run them locally:
| Sample | What it shows |
|---|---|
| 📚 demo-book-service | A CRUD REST API with a global exception handler |
| 🧑 demo-person-service | Bean Validation constraints (@Valid, @NotBlank, @Size) in the generated schemas |
| 🗄️ demo-spring-data-rest | Spring Data REST repositories documented automatically |
| 🔐 demo-oauth2 | OAuth 2 resource servers, Web MVC and WebFlux, with an authorization server |
🏃 Run a demo locally
You need Java 17+ and Maven:
git clone https://github.com/springdoc/springdoc-openapi-demos.git
cd springdoc-openapi-demos
mvn -pl demo-spring-boot-webmvc spring-boot:run
Then open the Swagger UI on the port set in the demo's application.yml (for this one 👉 http://localhost:8081).
🧭 Branches
| Branch | Spring Boot | springdoc-openapi |
|---|---|---|
🍃 master |
4.x | 3.x |
🍃 spring-boot-3 |
3.x | 2.x |
🍂 2.x |
2.x | 1.x |
💬 Getting help
- 📖 Read the springdoc-openapi documentation and the FAQ
- 🙋 Ask questions on Stack Overflow with the
springdoctag - 🐛 Report a problem with a demo in this repository's issues, and a problem with springdoc-openapi itself in its issues
🙏 Thanks
Special thanks to the Spring team and JetBrains for their support.
📄 License
The demos are Open Source software released under the Apache 2.0 license.
探索相关项目
加载中…

