forked from mercyblitz/geekbang-lessons
-
Notifications
You must be signed in to change notification settings - Fork 0
Homework 0410
jitwxs edited this page Apr 14, 2021
·
1 revision
- 提供一套抽象 API 实现对象的序列化和反序列化
- 通过 Lettuce 实现一套 Redis CacheManager
git checkout homework/0410
代码位于 org.geektimes.cache.serialize
包下,提供了以下两种实现:
-
org.geektimes.cache.serialize.impl.JavaSerializeImpl
原生序列化 -
org.geektimes.cache.serialize.impl.JsonSerializeImpl
JackJson
(1)修改 /META-INF/default-caching-provider.properties
改为 Lettuce 实现
javax.cache.CacheManager.mappings.redis=org.geektimes.cache.redis.LettuceCacheManager
(2)运行测试用例是否通过
- org.geektimes.cache.CachingTest#testSampleRedis