springboot单元测试不执行数据库

77 阅读1分钟

在单侧上面加上注解即可:

import org.springframework.transaction.annotation.Transactional;

@Transactional