Spring Boot¶
FF4j provides Spring Boot starters that help integrate FF4j into a Spring Boot application. The starters provide auto-configuration for FF4j, making it easy to set up and use. With the starters, you can easily enable or disable features in your application based on the configuration of FF4j.
Overview¶
FF4j provides two Spring Boot starters:
ff4j-spring-boot-starter-webmvc- The starter for Spring MVC applications.ff4j-spring-boot-starter-webflux- The starter for Spring WebFlux applications.
| Feature | ff4j-spring-boot-starter-webmvc | ff4j-spring-boot-starter-webflux |
|---|---|---|
| RESTful APIs | ✅ | ✅ |
| OpenAPI Documentation | ✅ | ✅ |
| Web Console | ✅ | ❌ |
Sample¶
With ff4j-spring-boot-starter-webmvc¶
Info
The complete sample is available in the ff4j-spring-boot-starter-webmvc-sample
Add the dependency ff4j-spring-boot-starter-webmvc
Configure FF4j
Run the application with mvn spring-boot:run and access the FF4j web console at http://localhost:8080/ff4j-console
With ff4j-spring-boot-starter-webflux¶
Info
The complete sample is available in the ff4j-spring-boot-starter-webflux-sample
Add the dependency ff4j-spring-boot-starter-webflux
Configure FF4j
Run the application with mvn spring-boot:run and access the FF4j web api at http://localhost:8080/swagger-ui/index.html