From 221ea82d53fb155c1a87f3bf85e3febfa2edae43 Mon Sep 17 00:00:00 2001 From: Paul Williams Date: Sat, 21 Feb 2026 13:05:25 +0530 Subject: [PATCH 1/2] docs(about): about ff4j-spring-boot-starters --- .../advanced-concepts/spring-boot/index.md | 104 +++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) diff --git a/docs/pages/about/advanced-concepts/spring-boot/index.md b/docs/pages/about/advanced-concepts/spring-boot/index.md index ab70981..8cf5913 100644 --- a/docs/pages/about/advanced-concepts/spring-boot/index.md +++ b/docs/pages/about/advanced-concepts/spring-boot/index.md @@ -1 +1,103 @@ -We know that you are waiting, we will have this section ready very soon. \ No newline at end of file +# Spring Boot + +FF4j has provided Spring Boot starters which helps in integrating FF4j into your Spring Boot +application. The starters provide autoconfiguration 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 has 2 Spring Boot starter + +- [ + `ff4j-spring-boot-starter-webmvc`](https://github.com/ff4j/ff4j-spring-boot-starter-parent?tab=readme-ov-file#ff4j-spring-boot-starter-webmvc) - + The starter for Spring MVC applications. +- [ + `ff4j-spring-boot-starter-webflux`](https://github.com/ff4j/ff4j-spring-boot-starter-parent?tab=readme-ov-file#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](https://github.com/ff4j/ff4j-samples/tree/master/ff4j-spring-boot-samples/ff4j-spring-boot-starter-webmvc-sample) + +=== "1. Dependency" + + Add the dependency [`ff4j-spring-boot-starter-webmvc`]() + + ```xml title="pom.xml" + + org.ff4j + ff4j-spring-boot-starter-webmvc + ${ff4j.version} + + ``` + +=== "2. Configuration" + + Configure FF4j + + ```kotlin title="FF4JConfiguration.kt" + import org.ff4j.FF4j + import org.ff4j.conf.XmlParser + import org.springframework.context.annotation.Bean + import org.springframework.context.annotation.Configuration + + @Configuration + class FF4JConfiguration { + @Bean + fun getFF4J(): FF4j = FF4j(XmlParser(), "ff4j-features.xml") + } + ``` + +=== "3. Bootstrap" + + 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](https://github.com/ff4j/ff4j-samples/tree/master/ff4j-spring-boot-samples/ff4j-spring-boot-starter-webflux-sample) + +=== "1. Dependency" + + Add the dependency [`ff4j-spring-boot-starter-webmvc`]() + + ```xml title="pom.xml" + + org.ff4j + ff4j-spring-boot-starter-webflux + ${ff4j.version} + + ``` + +=== "2. Configuration" + + Configure FF4j + + ```kotlin title="FF4JConfiguration.kt" + import org.ff4j.FF4j + import org.ff4j.conf.XmlParser + import org.springframework.context.annotation.Bean + import org.springframework.context.annotation.Configuration + + @Configuration + class FF4JConfiguration { + @Bean + fun getFF4J(): FF4j = FF4j(XmlParser(), "ff4j-features.xml") + } + ``` + +=== "3. Bootstrap" + + Run the application with `mvn spring-boot:run` and access the FF4j web console at `http://localhost:8080/ff4j-console` \ No newline at end of file From 13bf7b3b7ab846e94f6b2e24277e1e6bfb627f11 Mon Sep 17 00:00:00 2001 From: Paul Williams Date: Sun, 22 Feb 2026 07:12:59 +0530 Subject: [PATCH 2/2] docs(about): improve spring boot documentation --- .../advanced-concepts/spring-boot/index.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/pages/about/advanced-concepts/spring-boot/index.md b/docs/pages/about/advanced-concepts/spring-boot/index.md index 8cf5913..c54f4fd 100644 --- a/docs/pages/about/advanced-concepts/spring-boot/index.md +++ b/docs/pages/about/advanced-concepts/spring-boot/index.md @@ -1,19 +1,17 @@ # Spring Boot -FF4j has provided Spring Boot starters which helps in integrating FF4j into your Spring Boot -application. The starters provide autoconfiguration for FF4j, making it easy to set up and use. With +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 has 2 Spring Boot starter +FF4j provides two Spring Boot starters: -- [ - `ff4j-spring-boot-starter-webmvc`](https://github.com/ff4j/ff4j-spring-boot-starter-parent?tab=readme-ov-file#ff4j-spring-boot-starter-webmvc) - +- [`ff4j-spring-boot-starter-webmvc`](https://github.com/ff4j/ff4j-spring-boot-starter-parent?tab=readme-ov-file#ff4j-spring-boot-starter-webmvc) - The starter for Spring MVC applications. -- [ - `ff4j-spring-boot-starter-webflux`](https://github.com/ff4j/ff4j-spring-boot-starter-parent?tab=readme-ov-file#ff4j-spring-boot-starter-webflux) - +- [`ff4j-spring-boot-starter-webflux`](https://github.com/ff4j/ff4j-spring-boot-starter-parent?tab=readme-ov-file#ff4j-spring-boot-starter-webflux) - The starter for Spring WebFlux applications. | Feature | ff4j-spring-boot-starter-webmvc | ff4j-spring-boot-starter-webflux | @@ -32,7 +30,7 @@ FF4j has 2 Spring Boot starter === "1. Dependency" - Add the dependency [`ff4j-spring-boot-starter-webmvc`]() + Add the dependency `ff4j-spring-boot-starter-webmvc` ```xml title="pom.xml" @@ -71,7 +69,7 @@ FF4j has 2 Spring Boot starter === "1. Dependency" - Add the dependency [`ff4j-spring-boot-starter-webmvc`]() + Add the dependency `ff4j-spring-boot-starter-webflux` ```xml title="pom.xml" @@ -100,4 +98,4 @@ FF4j has 2 Spring Boot starter === "3. Bootstrap" - Run the application with `mvn spring-boot:run` and access the FF4j web console at `http://localhost:8080/ff4j-console` \ No newline at end of file + Run the application with `mvn spring-boot:run` and access the FF4j web api at `http://localhost:8080/swagger-ui/index.html` \ No newline at end of file