一念花开~

导航

 

springboot单元测试

package com.model;


import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
@Slf4j
@AutoConfigureMockMvc // 注入MockMvc
public class SpringbootApplicationTests {
//注意测试的包名 与 项目的包名 一致 例如:com.area

    @Test
    public void test() {
    
    }

}

  

posted on 2019-09-19 08:36  一念花开~  阅读(123)  评论(0)    收藏  举报