记录真实开发问题、项目实践和两三句就能说明白的技术点
springboot 配置mybatis打印sql 方式 一: ######################################################## ###配置打印sql ####################…
Cause: java.sql.SQLException: Zero date value prohibited ; Zero date value prohibited; nested exception is java.sql.SQLE…
问题: springboot 集成 mybatis-plus 3.4.2 报错 org.apache.ibatis.binding.bindingexception: invalid bound statement (not found) …
一、基本介绍 简介 log4j是使用java语言编写的可靠的、快速的、灵活的日志框架,它是基于Apache的license。 log4j支持c,c++,c#,perl,python,ruby等语言。在运行时通过额外的配置文件配置,提供不同的…
包引入 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </d…
我正在尝试设置Spring Boot JUnit5 pom.xml如下 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4…
问题:找不到Junit5,无法启动单体测试 解决方法: 添加依赖 spring-boot-starter-test默认使用junit4,需要手动添加junit5依赖。可通过两种方式来添加: <!-- Junit 5 --> <depende…
失败:nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.…
使用idea在DEBUG的时候出现Method breakpoints may dramatically slow down debugging, 如图: 根据语义可能是断点打在方法上面了,导致在某个断点卡住了。 重启服务器和重启idea已…
Module build failed: Error: ENOENT: no such file or directory, scandir 'D:\Commu nity\D4Mobile\node_modules\node-sass\ve…
Transaction 事务管理方式 在Spring中,事务有两种实现方式,分别是编程式事务管理和声明式事务管理两种方式。 编程式事务管理: 编程式事务管理使用TransactionTemplate或者直接使用底层的PlatformTran…
Spring事务传播属性Nested 说明: 如果有事务运行,就作为这个事务的嵌套事务运行; 如果没有事务运行,新建一个事务运行; 首先要说的,Nested类型事务测试时候使用DataSourceTransactionManager作为事务…
事务传播属性三. PROPAGATION_MANDATORY 说明: 当前方法必须要在有事务方法中运行,不然就抛出异常;如果有事务,就加入当前事务。 查看运行结果验证:抛出异常 Exception in thread "main" org.…
最近查看了Spring事务源码,是4.2.x的版本还是4.3.x的版本,简单了解了一些事务的概念,介绍下我对Spring事务源码的分析. Spring一共七种事务传播属性,本文先来作为开篇介绍。 REQUIRED事务,Spring Tran…
1.简单开启事务管理 @EnableTransactionManagement // 启注解事务管理,等同于xml配置方式的 <tx:annotation-driven /> 2.事务注解详解 默认遇到throw new RuntimeEx…