springboot 配置测试类

#1:添加测试类

 1         <!-- springboot测试集成       -->
 2         <dependency>
 3             <groupId>org.springframework.boot</groupId>
 4             <artifactId>spring-boot-starter-test</artifactId>
 5             <scope>test</scope>
 6             <exclusions>
 7                 <exclusion>
 8                     <groupId>org.junit.vintage</groupId>
 9                     <artifactId>junit-vintage-engine</artifactId>
10                 </exclusion>
11             </exclusions>
12         </dependency>
View Code

#2:测试类

 1 @SpringBootTest
 2 public class EducationSummaryApplicationTests {
 3 
 4     
 5 
 6     @Test
 7     public void test() {
 8         System.out.println("6666666");
 9     }
10 }
View Code

 

posted on 2022-01-13 09:35  夜空中闪闪发光的星星  阅读(149)  评论(0)    收藏  举报