记录真实开发问题、项目实践和两三句就能说明白的技术点
问题: 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…
Spring 报 Could not resolve placeholder 通常是配置未进入 Environment。本文给出核对属性名、激活 profile、@PropertySource 引入、多模块共享、默认值兜底等排查方案。
Windows 10 升级 Docker Desktop 后启动报 Failed to create or configure Hyper-V VM: 尝试执行未经授权的操作。原因多为 Windows 受控文件夹访问拦截了 Docker,将 Docker 加入白名单即可解决...
Spring 用 @Transactional 实现声明式事务。本文讲解基础用法、回滚规则(RuntimeException 才回滚)、传播行为,以及自调用失效、引擎不支持事务等常见坑点。
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…