Skip to content

49paunilay/Spring-Boot-Cache-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•’ Spring Boot Scheduler Demo with Redis Caching and H2 Database

This is a Spring Boot application that demonstrates:

βœ… Redis Caching
βœ… H2 In-Memory Database
βœ… Static Scheduled Tasks
βœ… Dynamic Scheduling using ScheduledFuture
βœ… ThreadPoolTaskScheduler Integration
βœ… Spring Filter


πŸš€ Features

🧠 Redis Caching

  • Uses @Cacheable, @CacheEvict, and @CachePut
  • Speeds up repeated reads from the database

πŸ—ƒοΈ H2 In-Memory Database

  • Auto-configured for quick development and testing
  • Data resets on restart
  • H2 Console enabled for easy viewing

⏱️ Static Scheduler

  • Executes fixed interval tasks using @Scheduled

πŸ”„ Dynamic Scheduler

  • Create, cancel, and manage scheduled tasks at runtime
  • Backed by ThreadPoolTaskScheduler and ScheduledFuture<?>

πŸ“¦ Tech Stack

  • Spring Boot
  • Spring Data JPA
  • H2 Database
  • Redis Cache
  • Spring Scheduler
  • Filter