简单增删改查+缓存
数据库
idea目录:
1.开启哨兵,设置主从关系
开启
[root@localhost redis-5.0.8]# redis-sentinel sentinel.conf
设置主从关系(以80为例,其他一样)
slaveof 192.168.253.3 6379
以下为idea内容
1.springbootcache->springbootcache
@SpringBootApplication
@MapperScan(basePackages = {
"com.zll.springbootcache.mapper"})
@EnableCaching
public class SpringbootcacheApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootcacheApplication.class, args);
}
}
2.resources->application.properties(连接数据库配置)
spring.datasource.