The Spring Cache APIs are still blocking, meaning that your services won't be fully reactive if you're using WebFlux with cache APIs. However, there is a workaround using Reactor's cache add-on, which can be integrated with Spring's CacheManager
. Until the blocking cache issue is resolved, you can use this add-on for a more reactive approach.
- Java 11
- Spring Boot
- Spring WebFlux
- Guava Cache
This API stores the most recently used data in the cache.
GET http://localhost:8080/fruit/1
To compile and run the project, ensure you have Java 11 and Maven installed.
mvn clean compile
mvn test
## Running the Project
mvn spring-boot:run
or with Docker:
docker build . -t webflux/restapi
docker run -p 8080:8080 webflux/restapi