spring cache会默认使用redis作为缓存吗?

 web项目中,只需要配置 redis 的IP,端口,用户名和密码就可以使用redis作为缓存了,不需要在在java 代码中配置redisConfig,redisConfig只是作为缓存配置的辅助,比如自定义缓存的key命名,设置缓存序列化的类型,设置缓存过期时间,分别对应下面的单个方法;

spring cache会默认使用redis作为缓存吗?

spring cache会默认使用redis作为缓存吗?

 

 spring cache会默认使用redis作为缓存吗?

 

下面的,缓存名称为user.key,该缓存会在redis中存一个key集合,对应的缓存key为

com.neo.web.UserControllergetUsers

com.neo.web.UserControllergetUser

spring cache会默认使用redis作为缓存吗?

spring cache会默认使用redis作为缓存吗?

 

相关文章:

  • 2021-08-18
  • 2021-09-11
  • 2022-03-08
  • 2021-05-23
  • 2022-01-20
猜你喜欢
  • 2021-11-22
  • 2021-10-19
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案