项目作者: rezaarshad

项目描述 :
Spring Webflux and blocking cache
高级语言: Java
项目地址: git://github.com/rezaarshad/Spring-Webflux-Cache.git
创建时间: 2020-06-04T13:45:24Z
项目社区:https://github.com/rezaarshad/Spring-Webflux-Cache

开源协议:

下载


REST API

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.

Technologies and Frameworks Used

  • Java 11
  • Spring Boot
  • Spring WebFlux
  • Guava Cache

Description

This API stores the most recently used data in the cache.

Sample Request

GET http://localhost:8080/fruit/1

Running Tests

To compile and run the project, ensure you have Java 11 and Maven installed.

```bash
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