07 2021 档案

摘要:主从复制架构仅仅用来解决数据的冗余备份,从节点仅仅用来同步数据 准备一个主服务器,N个备份服务器 方法一:修改备份服务器配置文件 redis.conf 中 #slaveof <masterip> <masterport> 去掉注释, slaveof 你的主redis服务器ip地址 主redis服务器 阅读全文
posted @ 2021-07-28 20:11 neoQVQ 阅读(58) 评论(0) 推荐(0)
摘要:package com.wbb.cache; import com.wbb.util.ApplicationContextUtils; import org.apache.ibatis.cache.Cache; import org.springframework.data.redis.core.R 阅读全文
posted @ 2021-07-28 16:06 neoQVQ 阅读(193) 评论(0) 推荐(0)
摘要:修改 redis.conf 1、开放防火墙端口 2、 # 允许任何主机连接、访问 bind 127.0.0.1 改为 bind 0.0.0.0 # 关闭保护模式 protected-mode yes 改为 protected-mode no # 允许后台运行 daemonize no 改为 daem 阅读全文
posted @ 2021-07-26 19:39 neoQVQ 阅读(117) 评论(0) 推荐(0)
摘要:开启AOF持久化 修改redis.conf文件 - a.修改 appendonly yes 开启持久化- b.修改 appendfilename "appendonly.aof" 指定生成文件名称 如果没有生成 appendonly.aof文件,执行下面命令 redis-cli config set 阅读全文
posted @ 2021-07-26 14:48 neoQVQ 阅读(54) 评论(0) 推荐(0)
摘要:springboot基于注解的切面开发方式,不用within和execution表达式方式 首先自定义一个注解 @Retention(RetentionPolicy.RUNTIME) //运行时生效 @Target(ElementType.METHOD) //作用在方法上 public @inter 阅读全文
posted @ 2021-07-20 16:42 neoQVQ 阅读(159) 评论(0) 推荐(0)
摘要:mark一下别人的地址,备忘: https://www.jianshu.com/p/e4192d7c6844 阅读全文
posted @ 2021-07-20 15:10 neoQVQ 阅读(117) 评论(0) 推荐(0)
摘要:1、idea里安装 log support2 插件后重启 2、设置settings -other settings 点开logsupport,framework选择slf4j 3、editor-live Templates 里 勾除 andirodLog,因为 有的话,使用时会出现andirod的用 阅读全文
posted @ 2021-07-20 15:08 neoQVQ 阅读(695) 评论(1) 推荐(0)
摘要:1、定义对象 package com.wbb.entity; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Compo 阅读全文
posted @ 2021-07-19 16:15 neoQVQ 阅读(345) 评论(0) 推荐(0)
摘要:1、直接注入 @autowired private XXXService xxxService; 2、也可以注入属性的set方法上 @RestController public class DemoController { private DemoService demoService; @Auto 阅读全文
posted @ 2021-07-19 15:09 neoQVQ 阅读(96) 评论(0) 推荐(0)
摘要:package com.wbb.config;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.sprin 阅读全文
posted @ 2021-07-02 20:33 neoQVQ 阅读(366) 评论(0) 推荐(0)
摘要:转自:https://www.cnblogs.com/javastack/p/12160464.html 1、数据库引擎不支持事务 2、没有被 Spring 管理 3、方法不是 public 的 4、自调用 同一类下:无事务方法调用有事务方法,事务不起作用。 不在同一个类里:类A的无事务方法调用类B 阅读全文
posted @ 2021-07-02 15:39 neoQVQ 阅读(147) 评论(0) 推荐(0)