Spring Boot FF4J Demo is a project used to be a poc (proof-of-concept) to implement a feature flag on Klikpajak project with the help of FF4J
There are several use cases will be developed in order to pass the poc based on the requirements.
-
Simple feature toggle
-
Implement RBAC (Role Based Access Control)
-
Persist feature on MySQL
-
Persist feature on Redis
-
Implement cache
-
Separate FF4j web and main application
-
Implement AOP based check
-
TBD
-
Java 8
-
Maven
Project are using maven to run
mvnw spring-boot:run
- FF4J web console
- Open browser
- Go to http://localhost:8080/ff4j-web-console/
- Toggle any feature we would like to enable/disable
- Simple toggle
Request a customer
feature as a customer
user
curl -X GET --location "http://localhost:8080/api/customers" \
-H "Accept: application/json" \
-H "Authorization: Basic Y3VzdG9tZXI6Y3VzdG9tZXI="
- RBAC based toggle
Request a seller
feature but authorized as a customer
user
curl -X GET --location "http://localhost:8080/api/sellers" \
-H "Accept: application/json" \
-H "Authorization: Basic Y3VzdG9tZXI6Y3VzdG9tZXI="
FF4J home
FF4J feature page
Simple toggle ON
Simple toggle OFF
RBAC based toggle
*Open seller API while logged in as customer
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.