Class AppRunner
- java.lang.Object
-
- org.oxerr.spring.cache.redis.scored.example.helloworld.AppRunner
-
- All Implemented Interfaces:
org.springframework.boot.CommandLineRunner
@Component public class AppRunner extends Object implements org.springframework.boot.CommandLineRunner
-
-
Field Summary
Fields Modifier and Type Field Description private BookRepository
bookRepository
private org.springframework.data.redis.cache.RedisCache
cache
private static org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description AppRunner(org.springframework.cache.CacheManager cacheManager, BookRepository bookRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
clearCache()
private void
fetch(String isbn)
void
run(String... args)
private void
saveBook(String isbn)
private void
sep(String s)
private void
stat()
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
cache
private final org.springframework.data.redis.cache.RedisCache cache
-
bookRepository
private final BookRepository bookRepository
-
-
Constructor Detail
-
AppRunner
public AppRunner(org.springframework.cache.CacheManager cacheManager, BookRepository bookRepository)
-
-
Method Detail
-
run
public void run(String... args) throws Exception
- Specified by:
run
in interfaceorg.springframework.boot.CommandLineRunner
- Throws:
Exception
-
saveBook
private void saveBook(String isbn)
-
fetch
private void fetch(String isbn)
-
stat
private void stat()
-
clearCache
private void clearCache()
-
sep
private void sep(String s)
-
-