"Welcome To Ashok IT" "Spring Boot and MicroServices" Topic : Spring data Redis Date : 28/07/2025 (Session - 95) ______________________________________________________________________________________________________________________ Last Session ============ * We completed SpringBoot Integration with Apacke Kafka. Today Session ============== * Redis -> Remote Directory servers * Spring Data Redis is a part of the Spring Data project that makes it easy to interact with a Redis key-value store using Spring programming patterns. It abstracts Redis operations using repositories, templates, and messaging support, offering seamless integration with Spring Boot. * Downloading Redis Software : https://github.com/microsoftarchive/redis/releases/tag/win-3.2.100 * Download the following folder from the above URL i.e., Redis-x64-3.2.100.zip and extract to normal folder and run redis-server.bat file * Redis server is running and up with default port number: 6379 Steps For Developing Spring Boot Application with Spring Data Redis ==================================================================== 1) create spring boot application with below starters * web * lombok * Spring Data redis(Access+Driver) * mysql driver * Data JPA 2) Complete development for POST,GET,DELETE RestAPI user. 3) Enabling the caching in our spring boot application @EnableCaching 4) Redis configuration in application.properties #Redis Configuration spring.redis.port=6379 spring.redis.host=localhost #Enabling caching spring.cache.type=redis 5) Spring Data redis having annotaton driven approach * @CachePut >>>> Storing data into redis cache * @Cacheable >>>> Retreiving data from redis cache * @CacheEvict >>>> Deleting data from redisc cache