OfficeFloor Migration Guide
This guide is for those interested in progressively migrating from a Spring Boot application to running natively on OfficeFloor. The Tutorials page covers adding OfficeFloor capabilities to Spring Boot without any migration. Come back here only if you want to go further.
The migration is structured as progressive stages. You can stop at any stage.
- Spring in OfficeFloor hosts your Spring beans inside the OfficeFloor runtime. All existing Spring configuration continues to work. Existing Spring Web MVC controllers continue to function while YAML REST procedures are added alongside them.
- Native OfficeFloor removes the Spring dependency entirely. All REST YAML files, service classes, and team configurations carry over unchanged.
Additional content covering reactive streams, cloud deployment, and legacy integration is included below for completeness.
Phase 1: Spring in OfficeFloor
In this phase the OfficeFloor runtime takes ownership of the HTTP server while your existing Spring configuration continues to supply dependency-injected beans. No Spring code changes are required. Moving to this phase unlocks further OfficeFloor capabilities such as native thread injection and the full WoOF infrastructure layer, while the familiar Spring programming model remains intact.
Spring Beans
Host Spring beans directly as OfficeFloor managed objects. Your Spring @Service, @Repository, and @Component beans are available for injection into any OfficeFloor procedure exactly as they are in a Spring Boot application.
| Tutorial | Description | Covered |
|---|---|---|
| Spring Beans | Host Spring beans inside the OfficeFloor runtime. Spring is used purely as a dependency supplier; all beans remain available for injection. | SpringSupplierSource Spring beans as managed objects |
Spring Web MVC in OfficeFloor
Host an existing Spring Web MVC application inside the OfficeFloor runtime. Existing @Controller endpoints continue to work while YAML REST procedures can be added alongside them.
| Tutorial | Description | Covered |
|---|---|---|
| Spring Web MVC | Run Spring Web MVC @Controller endpoints within OfficeFloor while adding YAML REST procedures. | Spring Web MVC @Controller in OfficeFloor |
Phase 2: Native OfficeFloor
If there is interest in removing Spring as a runtime dependency, OfficeFloor can run without it. All REST YAML files, service classes, and team configurations carry over unchanged. The following tutorials explore the complete set of native OfficeFloor capabilities organised by concern.
Core REST and Dependency Injection
The foundation tutorials for native OfficeFloor REST applications.
| Tutorial | Description | Covered |
|---|---|---|
| REST | Declare REST endpoints as YAML configuration; dependency inject request data and services. | REST @PathParameter , HttpException |
| Dependency Injection | Dependency inject plain old Java objects (POJOs) into REST procedures. | Dependency Injection |
| Environment | Configure application behaviour across environments using properties and profiles. | @Property , Profile |
| Logging | Inject loggers that identify their location within the application. | Logger |
| OpenAPI / Swagger | Generate OpenAPI documentation from native OfficeFloor REST YAML endpoint declarations. | OpenAPI Swagger |
| Exception Handling | Handle and map exceptions within native OfficeFloor REST flows. | @Parameter Exception handling |
Persistence
Connecting native OfficeFloor applications to relational databases.
| Tutorial | Description | Covered |
|---|---|---|
| Database | Dependency inject a customised managed object backed by a database connection pool. | ManagedObjectSource |
| Transaction | Govern transactions across multiple procedures within a REST flow. | Governance |
| Flyway | Run Flyway schema migrations on application start up. | Flyway |
Security
Authentication and authorisation for native OfficeFloor REST applications.
| Tutorial | Description | Covered |
|---|---|---|
| Authentication | Configure HTTP authentication across REST endpoints. | Authentication |
| JWT | Single-server application with combined JWT security and authority. | JWT Security JWT Authority |
| JWT Authority | Dedicated JWT authority server issuing and renewing tokens. | JWT Authority |
| JWT Resource | JWT-secured resource server validating tokens issued by a separate authority. | JWT Security |
| Session | Store and retrieve state between requests using the HTTP session. | @HttpSessionStateful |
| Secure Page | Require HTTPS for an entire page and its links. | Template Secure |
| Secure Link | Require HTTPS for an individual link within a page. | Link Secure |
Infrastructure and Concurrency
OfficeFloor's IOCC model provides fine-grained control over threads, start-up ordering, caching, and modularisation. These tutorials explore that infrastructure layer.
| Tutorial | Description | Covered |
|---|---|---|
| Thread Injection | Assign specific thread teams to procedures to performance-tune the application. | Thread Injection |
| Thread Affinity | Bind procedures to CPU cores using the Executive for cache-friendly execution. | Executive |
| Start-up Ordering | Declare ordered start-up dependencies between ManagedObjectSource instances. | start-before , start-after |
| Cache | Cache constant values to avoid repeated computation or lookup. | Cache |
| Activity | Modularise REST YAML configuration into reusable Activity units. | Activity (Section) |
| Testing | Unit, system, and integration test OfficeFloor REST applications. | Unit / System / Integration testing |
Static Content
For modern single-page applications, the REST YAML endpoints provide the API and static assets are served directly from the classpath.
| Tutorial | Description | Covered |
|---|---|---|
| Static Content | Serve SPA assets (HTML, CSS, JavaScript) from the PUBLIC/ classpath directory alongside REST endpoints. |
/PUBLIC |
Reactive
OfficeFloor's threading model integrates cleanly with reactive libraries. These tutorials demonstrate how to wire reactive streams and reactive database clients as procedures in REST YAML composition.
| Tutorial | Description | Covered |
|---|---|---|
| Reactor | Integrate Project Reactor publishers and subscribers as OfficeFloor procedures. | Project Reactor Reactive streams |
| R2DBC | Reactive relational database access using R2DBC within OfficeFloor REST composition. | R2DBC Reactive database |
| Vertx SQL Client | High-performance database interaction using the Vert.x SQL Client. | Vertx SQL Client |
Cloud and Deployment
Cloud Platforms
Deploy native OfficeFloor applications to major cloud and serverless platforms.
| Tutorial | Description | Covered |
|---|---|---|
| Deploy | Package and deploy an OfficeFloor application including Docker containerisation. | Deploy , Docker |
| AWS SAM | Deploy as an AWS Serverless Application Model (SAM) function. | AWS Serverless |
| Google Function | Deploy as a Google Cloud Function. | Google Cloud Function |
| Azure Web Apps | Deploy to Azure Web Apps. | Azure Web Apps |
Cloud Datastores
Integrate cloud-native datastores into OfficeFloor REST applications as managed objects.
| Tutorial | Description | Covered |
|---|---|---|
| DynamoDB | Integrate Amazon DynamoDB as an OfficeFloor managed object. | DynamoDB |
| Cosmos DB | Integrate Azure Cosmos DB (synchronous client) as an OfficeFloor managed object. | Cosmos DB |
| Async Cosmos DB | Integrate Azure Cosmos DB (asynchronous client) as an OfficeFloor managed object. | Async Cosmos DB |
| Firestore | Integrate Google Cloud Firestore as an OfficeFloor managed object. | Firestore |
| Objectify | Integrate Google Cloud Datastore via Objectify as an OfficeFloor managed object. | Objectify |
Legacy Integration
For applications that must co-exist with a Servlet container, WAR deployment, or JAX-RS framework. The step-by-step guides below show how to embed each legacy format and then progressively migrate to native OfficeFloor.
JEE Web Archive (WAR / Servlets)
| Step | Tutorial | Description | Covered |
|---|---|---|---|
| 1 | Embed WAR | Run a JEE WAR within OfficeFloor. | WAR |
| 2 | Servlet Procedures | Integrate Servlets and Filters as OfficeFloor Procedures. | Servlet / Filter Procedure |
| 3 | Migrate Servlet | Remove the JEE Servlet dependency and run natively on OfficeFloor. | Migrate Servlet / Filter |
JAX-RS
| Step | Tutorial | Description | Covered |
|---|---|---|---|
| 1 | Embed JAX-RS | Run JAX-RS resources within OfficeFloor as a WAR. | JAX-RS WAR |
| 2 | JAX-RS Procedures | Integrate JAX-RS resource methods as OfficeFloor Procedures. | JAX-RS Procedure |
| 3 | Migrate JAX-RS | Remove the JAX-RS dependency and run natively on OfficeFloor. | Migrate JAX-RS |
HttpServlet Container Embedding
| Tutorial | Description | Covered |
|---|---|---|
| Embed in HttpServlet Container | Embed WoOF inside an existing HttpServlet container such as Tomcat or Jetty. | Servlet , PaaS / Cloud |

