1.pom.xml添加依赖org.springframework.bootspring-boot-starterorg.springframework.bootspring-boot-starter-weborg.projectlomboklomboktrueorg.springframework.bootspring-boot-starter-testtestorg.springframework.bootspring-boot-starter-data-redis2.application-
2023-05-26评论:0访问次数:714
配置Redis1.添加Redis依赖org.springframework.bootspring-boot-starter-data-redis2.添加redis配置信息redis:host:127.0.0.1port:6379database:0password:#连接超时时间timeout:10s配置AOP1.自定义注解/***防止表单重复提交注解*/@Target(ElementType.METHOD)//注解的作用目标为方法@Retention(RetentionPolicy.RUNTI
2023-06-03评论:0访问次数:791
1、下载redis2、上传至/usr/files3、解压至/usr/local/redis-6.0.6 tarxzfredis-6.0.6.tar.gz-C/usr/local/redis-6.0.64、进入解压文件夹 cdredis-6.0.65、make6、src/redis-server如果大家在centos7下编译redis6.0版本,如果出现以下错误Infileincludedfromserver.c:30:0:server.h:1022:5:error:expectedspeci
2023-05-27评论:0访问次数:1021
1.引入依赖org.springframework.bootspring-boot-starter-data-redis2.配置#启动redis#redis的数据库索引(默认为0)spring.redis.database=2#redis的服务器地址spring.redis.host=127.0.0.1#密码(没有就为空)spring.redis.password=#连接池的最大连接数spring.redis.jedis.pool.max-active=2000#连接池的最大阻塞等待时间(使用负
2023-05-27评论:0访问次数:1141
1.导入Redis的依赖org.springframework.bootspring-boot-starter-data-redis2.在application.properties中对redis进行相应的配置#redis配置#Redis服务器地址spring.redis.host=127.0.0.1#Redis服务器连接端口spring.redis.port=6379#Redis数据库索引(默认为0)spring.redis.database=0#连接池最大连接数(使用负值表示没有限制)spr
2023-06-02评论:0访问次数:631