https://github.com/boldare/redis-with-spring-mvc
The demo app showing how to store request payload in Redis using Spring MVC
https://github.com/boldare/redis-with-spring-mvc
Last synced: 10 months ago
JSON representation
The demo app showing how to store request payload in Redis using Spring MVC
- Host: GitHub
- URL: https://github.com/boldare/redis-with-spring-mvc
- Owner: boldare
- Created: 2017-06-25T15:13:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-25T20:59:00.000Z (almost 9 years ago)
- Last Synced: 2025-01-11T14:22:09.585Z (over 1 year ago)
- Language: Java
- Size: 55.7 KB
- Stars: 0
- Watchers: 53
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Demo app for the "How to store a request body in Redis" post
[](https://travis-ci.com/xsolve-pl/redis-with-spring-mvc)
## Blog post
The relevant blog post can be found [on our XSolve blog](https://xsolve.software/blog/redis-with-spring-mvc/)
## How to
Run the demo with
```bash
docker-compose up
```
Then, once the application starts, execute a test request:
```bash
curl -H "Content-Type: application/json" \\
-H 'X-MessageSystems-Batch-ID: 123-456' \\
-d '{"data":"test data"}' localhost:8080/
```
Next, verify that the request payload has been saved in your redis instance, available under `localhost:6379`, under the key `123-456`. For this purpose,
we recommend using the [Redis Desktop Manager](https://github.com/uglide/RedisDesktopManager/releases/tag/0.8.3).
### Cleanup
Execute
```bash
docker-compose down
```
## Tests
Don't forget to check out the `StoreRequestInRedisTest`, which can be run with `./gradlew test`.