springboot 1.5.X junit测试

import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
public class Test {
    @org.junit.Test
    public void test() {
    }
}

猜你喜欢

转载自www.cnblogs.com/xiaojf/p/9023238.html