摘要: characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai,url后面拼接这个就好了 阅读全文
posted @ 2024-03-14 16:16 nitianxiaozi 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 起初,有一张表超级大想要将表复制下来 如果查出来list再去复制这将非常慢,听了同事的建议使用了insert into (select * from table)速度得到了显著改善。可是我写代码的时候,再调用接口的时候发现足足有15s,而navicat执行sql语句只有400ms,感觉哪里出了问题但 阅读全文
posted @ 2023-12-18 20:08 nitianxiaozi 阅读(25) 评论(0) 推荐(0) 编辑
摘要: public class StateListener implements ApplicationListener<ContextRefreshedEvent> { @Resource private ConnectionFactory connectionFactory; @Bean public 阅读全文
posted @ 2023-12-13 17:35 nitianxiaozi 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 先将请求头取出RequestContextHolder.getRequestAttributes()调用异步方法时再塞进去public void async(){ RequestContextHolder.setRequestAttributes(requestAttributes); } 阅读全文
posted @ 2023-12-13 16:22 nitianxiaozi 阅读(168) 评论(0) 推荐(0) 编辑
摘要: characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai 数据库后面加上这个可以解决 阅读全文
posted @ 2023-12-12 19:12 nitianxiaozi 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 子查询 SELECT cn.portal_id AS portalId, count( id ) AS num FROM construction_package_wbs_node cn WHERE cn.delete_flag = 0 AND ( cn.node_type = '单位工程' OR 阅读全文
posted @ 2023-12-03 14:39 nitianxiaozi 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 1. any_value()的使用 SELECT t.portal_id AS portalId, any_value(t.cumulative_comleted) AS completed FROM ( SELECT pfndo.portal_id, pfndo.milestones_node_d 阅读全文
posted @ 2023-12-03 10:55 nitianxiaozi 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 1. PageInfo pageInfo = new PageInfo(progressFileNews); 2. pageInfo.setList(voList); 第一步,放入sql查询出的list 把total page size 信息拿到 第二步,将分页的list塞成自己想要分页的同源lis 阅读全文
posted @ 2023-12-03 10:18 nitianxiaozi 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 需要在注解上指明事务管理器: @Transactional(transactionManager = "fawkesTransactionManager")public void batchInsert(List list){ ....} 阅读全文
posted @ 2023-11-30 19:13 nitianxiaozi 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 多数据源打印sql日志配置: @Bean @ConfigurationProperties(prefix = "mybatis.configuration") public org.apache.ibatis.session.Configuration configuration() { retur 阅读全文
posted @ 2023-11-30 17:58 nitianxiaozi 阅读(206) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示