How-Tos: REST APIs & Web
Building and publishing HTTP APIs, frontend integration, and real-time updates to the browser.
HTTP APIs
- Enable HTTP compression for a Spring Boot server and its REST clients.
- Document a REST API with OpenAPI — add the swagger starter, declare interfaces as
GroupedOpenApibeans, and document operations/schemas with annotations. - Publish an OpenAPI spec to the Architecture Repository — add the starter, enable publishing, configure OAuth2.
Frontend integration
- Enable and customize the current-user endpoint — expose token claims to a frontend as JSON, with a custom DTO/customizer if needed.
- Handle direct frontend route navigation in Spring Boot SCS — fix 404s on a bookmarked/external direct link into a single-page application's own routing.
Real-time updates
- Push resource-change events to the browser and subscribe to them, via Server-Sent Events.