mysql分组后获取每个组排序后的第一条数据(整行)
摘要:有一个学生分数表student,数据结构是这样的 CREATE TABLE `student` ( `id` int(11) NOT NULL, `student_id` int(11) DEFAULT NULL, `line` int(11) DEFAULT NULL, `subject_type
阅读全文
posted @
2021-07-02 11:25
腾逸
阅读(8711)
推荐(1) 编辑
存储过程--添加索引、删除索引
摘要:/*存在则删除存储过程*/drop procedure if EXISTS add_index_while_procure;/*查看存储过程*/show procedure status;show create procedure add_index_while_procure; 1 delimit
阅读全文
posted @
2021-07-02 10:48
腾逸
阅读(516)
推荐(0) 编辑
Caused by: com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed
摘要:报错场景:spring boot+mybatis,线程池执行批量任务。springboot正常启动后,定时任务中数据库查询报错。报错信息如下: 1 Caused by: org.apache.ibatis.exceptions.PersistenceException: 2 ### Error qu
阅读全文
posted @
2021-07-02 09:25
腾逸
阅读(11758)
推荐(1) 编辑
SpringBoot启动时让方法自动执行的几种实现方式
摘要:在springBoot中我们有时候需要让项目在启动时提前加载相应的数据或者执行某个方法,那么实现提前加载的方式有哪些呢?接下来我带领大家逐个解答 1.实现ServletContextAware接口并重写其setServletContext方法 实现ServletContextAware 注意:该方法
阅读全文
posted @
2021-07-02 09:14
腾逸
阅读(549)
推荐(0) 编辑