Mybatis在Mapper上加注解关闭二级缓存
发表于|更新于
|浏览量:
久视伤血,久卧伤气,久坐伤肉,久立伤骨,久行伤筋。——曹廷栋
代码如下
1 | import org.apache.ibatis.annotations.CacheNamespace; |
上使用@CacheNamespace注解,并将implementation设置为org.apache.ibatis.cache.impl.PerpetualCache.class,blocking设置为false即可禁用二级缓存
相关推荐
2022-09-28
springboot动态配置
耐心和持久胜过激烈和狂热——拉封丹 分享一个springboot动态配置框架:https://github.com/Code2Life/spring-boot-dynamic-config 在一些场景下可以用到热更新配置 轻量方便,简单好用 GAV 12345<dependency> <groupId>top.code2life</groupId> <artifactId>spring-boot-dynamic-config</artifactId> <version>1.0.9</version></dependency> 添加注解:@DynamicConfig 以及@Value 1234567891011121314151617181920212223242526272829303132333435import lombok.Data;import org.springframework.beans.factory.annotation.Value;impor...
2024-08-04
HuTool 6.0LambdaUtil
家庭是用孜孜不倦的爱情的劳动建立起来的。——陀思妥耶夫斯基 介绍LambdaUtil 是一个用于处理 Lambda 表达式的工具类,提供了解析、获取信息和构建 Lambda 方法的多种功能。 使用方法介绍Lambda 获取相关方法 getRealClass 获取 Lambda 实现类。 resolve 解析 Lambda 表达式,并缓存结果。 getMethodName 获取 Lambda 表达式的函数名称。 getFieldName 获取 Lambda 表达式 Getter 或 Setter 对应的字段名称。 buildGetter 构建 Getter 方法引用。 buildSetter 构建 Setter 方法引用。 build 构建指定方法的 Lambda 引用。 toFunction 将 BiFunction 转换为 Function。 toPredicate 将 BiPredicate 转换为 Predicate。 toConsumer 将 BiConsumer 转换为 Consumer。 getInvokeMethod ...
2023-12-28
spring注解排除某些bean
劳动是唯一导向知识的道路。——萧伯纳 使用: 12@ComponentScan(excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = {WillExludeBean.class, AnotherWillExludeBean.class})}) 即可 这里还有其他的过滤类型 例如注解 123@ComponentScan(excludeFilters = @Filter( type = FilterType.ANNOTATION, value = Service.class)) 切面 123@ComponentScan(includeFilters = @Filter( type = FilterType.ASPECTJ, pattern = "com.example..*Service+")) 正则 123@ComponentScan(includeFilters ...
2023-11-26
spring-state-machine监听器
在做艺术家之前,先要做一个人。——罗丹 分享一个spring-state-machine监听器的用法: 12345678910111213141516171819202122232425262728293031323334353637383940stateMachine.addStateListener(new StateMachineListenerAdapter<States, Events>() { @Override public void stateEntered(State<States, Events> state) { StateMachineMessage message = new StateMachineMessage(); message.setMessage("Enter state " + state.getId().toString()); simpMessagingTemplate.convertAndSend("/topic/sm.messag...
2024-10-26
Apache Kyuubi
求学的三个条件是:多观察、多吃苦、多研究。——加菲劳 文档: Quick Start — Apache Kyuubi GitHub: https://github.com/apache/kyuubi Apache Kyuubi 是一个分布式多租户网关,用于在数据仓库和 Lakehouse 上提供无服务器 SQL。 Kyuubi 通过 Thrift JDBC/ODBC 接口提供纯 SQL 网关,供最终用户使用预编程和可扩展的 Spark SQL 引擎操作大规模数据。这种“开箱即用”的模型最大限度地减少了最终用户在客户端使用 Spark 的障碍和成本。在服务器端,Kyuubi服务器和引擎的多租户架构为管理员提供了实现计算资源隔离、数据安全、高可用性、高客户端并发等的方法。 类似 HiveServer2 的 API 多租户 Spark 支持 以无服务器方式运行 Spark Kyuubi 的目标是让anyone可以轻松高效地使用 Spark(也许很快还有其他引擎),并方便用户像处理普通数据一样处理大数据。这里, anyone意思是用户不需要有 Spark 技术背...
2020-07-14
Gitlab的安装
Gitlab安装1.安装相关依赖 1yum -y install policycoreutils openssh-server openssh-clients postfix 2.启动ssh服务&设置为开机启动 1systemctl enable sshd && sudo systemctl start sshd 3.设置postfix开机自启,并启动,postfix支持gitlab发信功能 1systemctl enable postfix && sudo systemctl start postfix 如果报这个错 1Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details. 可以采取以下解决方案 1234#修改 /etc/postfix/m...

阿超
我的名字叫阿超 年龄25岁 家在北京市 职业是软件开发 每天最晚也会在八点前回家 不抽烟 酒浅尝辄止 晚上十二点上床 保证睡足八个小时 睡前写一篇博客 再做二十分钟俯卧撑暖身 然后再睡觉 基本能熟睡到天亮 像婴儿一样不留下任何疲劳和压力 就这样迎来第二天的早晨 健康检查结果也显示我很正常 我想说明我是一个不论何时都追求内心平稳的人 不拘泥于胜负 不纠结于烦恼 不树立使我夜不能寐的敌人 这就是我在这社会的生活态度
Follow Me公告
This is my Blog