spring boot集成junit单元测试

主启动类所在模块的pom.xml,添加junit依赖,如下:

        <!-- springboot的测试框架,里面有对junit4的依赖 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

 

posted @ 2022-04-25 21:49  jamstack  阅读(47)  评论(0编辑  收藏  举报