- 博客(31)
- 收藏
- 关注
原创 was not registered for synchronization because synchronization is not active
报错如下:Creating a new SqlSession[org.apache.ibatis.session.defaults.DefaultSqlSession@4e872071] was not registered for synchronization because synchronization is not active再写树形菜单时,因为要根据父级id查询两边,报了事务关闭的错误controller层:mapper层:解决方法:在mapper层中的方法参数前加上注解@
2021-11-23 17:40:07
1177
原创 Could not autowire.No beans of ‘HmbCompanyDao‘ type found.
解决:如果还报错,可能导包错了等。
2021-11-22 15:22:55
330
原创 Error starting ApplicationContext. To display the conditions report re-run your application with ‘de
Bebug运行SpringBoot项目启动报错:这个是因为端口8081被占用了啦
2021-11-18 14:40:39
192
原创 springBoot项目启动报: Error starting ApplicationContext.
报错的日志????Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.Disconnected from the target VM, address: ‘127.0.0.1:50861’, transport: ‘socket’ERROR com.alibaba.druid.pool.DruidDataSource - {d
2021-11-12 15:59:03
494
原创 MySQL的定时任务执行函数
先写一个函数(创建存储过程)CREATE PROCEDURE insert_monitor () BEGIN SET @V_EXEC_SQL = concat( "CREATE TABLE matchs_", DATE_FORMAT( now(), '%Y%m' ), " AS SELECT * FROM matchs;" ); PREPARE STMT FROM @V_EXEC_SQL; EXECUTE STMT; DEALLOCATE PREPARE STMT; SET @V_
2021-11-11 17:05:15
1928
原创 Mapper.xml中参数是数组、集合的情况
Mapper.xml中参数是数组、集合的情况:数组:(举例传参为 Integer[]数组)<select id="selectByConditions" resultMap="ResultMap" parameterType="Integer[]"> select <include refid="Base_Column_List"/> from hmb_logs where 1 = 1 <if test="
2021-11-05 15:57:00
3223
原创 map集合的遍历方式
map集合的遍历方式Map<String, String> map = new HashMap<String, String>();map.put(“1”, “value1”);map.put(“2”, “value2”);map.put(“3”, “value3”); // 第一种 System.out.println("通过Map.keySet遍历key和value:"); for (String key : map.keySet()) {
2021-11-05 14:37:46
68
原创 根据日期求比赛的正负次数,sum(case ? when ? then else 0 end)的用法
**根据日期求比赛的正负次数**如图????1、这是开始的查询所有图2、这是要得到的结果图3、解法:(一)这是开始自己想的:select z.date ‘日期’,z.a ‘正’,f.b ‘负’ from (select date,count(state) ‘a’from matchs where state=‘正’ group by date) as z left join ( selectdate,count(state) ‘b’ from matchs where state=‘
2021-10-22 17:53:12
2105
1
原创 IDEA中调整代码格式的快捷键
**>IDEA中调整代码格式的快捷键**一、默认的快捷键是: Ctrl+Alt+L如果登录了QQ就没有效果,因为锁定的快捷键就是这个。。所以有第二种????**二、自定义快捷键:点击左上角** File-Settings **打开设置窗口。点击 Keymap ,在右侧搜索框中输入 reformat ,找到Code下方的Reformat Code,可以看到右侧显示快捷键为Ctrl+Alt+L。选中Reformat Code,右键选择 Add Keyboard Shortcut。在快捷键
2021-10-22 10:27:10
5153
原创 2020-12-26
SSM项目中用Mapper.xml映射文件中操作数据库的sql注意点!!!有无参数,注意返回值的类型sql语句有条件时,注意用户if判断
2020-12-26 13:43:50
62
原创 Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested ex
这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Markdown编辑器你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Ma.
2020-12-23 09:40:26
630
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人