
JAVA
1251578741
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
@SpringBootTest 单元测试遇到的坑
1、环境 spring boot 版本:2.4.3 2、遇到的问题 (1)@Before、@After 失效 (2)org.junit.runners.model.InvalidTestClassError: 3、解决方式 注意 import 的junit 包的配套问题 #junit5 配套 import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.jun...原创 2021-04-02 10:54:49 · 2070 阅读 · 0 评论 -
Springboot+mybatis Service层使用@Autowired 注解 mapper对象爆红问题
1、为避免程序运行报错 ,需要在Application.class添加注解@MapperScan(mapper包位置) @SpringBootApplication(scanBasePackages={"com.example.api","zd.test.server","zd.test.entity","zd.test.dal"}) //@SpringBootApplication //@ComponentScan({"com.example.api","zd.test.server","zd.tes转载 2021-02-02 16:33:30 · 2621 阅读 · 3 评论