在springboot2.7体系中,junit是默认采用5的版本。 测试类的写法与之前早期的springboot版本不同!
	
1、pom.xml引入
	  <!--springboot test-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
	
		
	
	
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest(classes = MyCloudServerApplication.class) //classes传springboot的启动类
public class MybatisPlusTest01 {
    @Test
    public void test1(){
    
    }
}


					阅读排行
				

Copyright ©  叮叮声的奶酪 版权所有   
               备案号:鄂ICP备17018671号-1