springboot怎么建测试类测试接口
1个回答
展开全部
1、pom文件引入即
org.springframework.boot
spring-boot-starter-redis
2、编写CacheService接口使用redisCacheServiceImpl实现接口
官网原文说提供三接口注入自实现其实现类默认本端口号6379redis
You can inject an auto-configured RedisConnectionFactory, StringRedisTemplate or vanilla RedisTemplate instance as you would any other Spring Bean.By default the instance will attempt to connect to a Redis server using localhost:6379:
org.springframework.boot
spring-boot-starter-redis
2、编写CacheService接口使用redisCacheServiceImpl实现接口
官网原文说提供三接口注入自实现其实现类默认本端口号6379redis
You can inject an auto-configured RedisConnectionFactory, StringRedisTemplate or vanilla RedisTemplate instance as you would any other Spring Bean.By default the instance will attempt to connect to a Redis server using localhost:6379:
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询