Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 7.35 KB

File metadata and controls

59 lines (45 loc) · 7.35 KB

Spring Boot Plugin Tutorials

The OfficeFloor Spring Boot tutorial series covers the YAML endpoint model and its integration with the wider Spring ecosystem. Each tutorial is a complete, runnable Spring Boot project.

The full series with narrated explanations is on the website: https://officefloor.net/tutorials/index.html. Each entry below links to its runnable source on GitHub.

Start here

Function orchestration

Composing an endpoint from small, single-purpose functions wired together in YAML — the function is the unit of composition, the YAML is the specification.

  • Function — multi-function endpoints with next: and outputs: (Continuation Injection).
  • Variable — passing state downstream between functions via Out<T> / @Val, without coupling caller to callee.
  • Governance — wrapping function execution with cross-cutting concerns via govern:.
  • Exception — handling exceptions (escalations) via escalations: and global handlers.
  • REST CRUD Orchestration — a full CRUD resource built from Load/Build producers, Apply/Save actions and RespondWith responders for GET, POST, PUT and DELETE.
  • Filtering and Pagination — collection endpoints with an optional query-parameter filter combined with pagination.
  • Related Entities — two related entities showing a shared Load reused across endpoints and an ownership-scoped load that finds a child within its parent.
  • Resolving References — a Resolve function that enriches an entity by looking up managed references, shared across create and update.
  • Problem Detail Errors — structured RFC 7807 error responses via office-level escalation handlers (domain 404, validation 400 with field errors, catch-all 500).
  • Testing Functions — unit testing individual functions with the shipped MockVar and MockObjectResponse, and one integration test for the wiring.
  • Orchestration Patterns and Naming — the function naming conventions and the DTO to entity to DTO data-flow, plus the one-shot request body, @Valid ordering and variable reference-semantics rules.

Beyond Spring MVC — additional capabilities

Capabilities OfficeFloor provides over and above Spring MVC, through its function and thread injection.

  • Managed Object — OfficeFloor Managed Objects, the native unit of state.
  • Supplier — supplying a library of related managed objects from a single declaration.
  • Team — Thread Injection: assigning threads/pools to functions.

Spring ecosystem integration

  • Data JPA — Spring Data JPA with YAML composition and transaction governance.
  • Security — securing endpoints with Spring Security.
  • Validation — Bean Validation with YAML composition.
  • Qualifier@Qualifier injection into service methods.
  • Actuator — Spring Boot Actuator production endpoints.
  • OpenAPI — YAML endpoints appearing in generated OpenAPI documentation.
  • CORS — configuring Cross-Origin Resource Sharing.
  • Servlet — direct injection of jakarta.servlet.http.HttpServletRequest.
  • Thymeleaf — server-side HTML rendering from service methods.

Other JVM languages and effect systems

  • Kotlin — endpoint logic in Kotlin.
  • Scala — endpoint logic in Scala.
  • JavaScript — JavaScript via GraalVM.
  • Cats Effect — using Cats Effect within a handler.
  • ZIO — using ZIO within a handler.