spring boot集成Junit
前段时间开始使用spring boot框架,需要集成Junit单元测试,花了好一会儿才弄好,故此处做个备忘。
@RunWith(SpringRunner.class)
@SpringBootTest
@WebAppConfiguration
//指定创建容器时使用哪个配置文件
public class UserControllerTest {
前段时间开始使用spring boot框架,需要集成Junit单元测试,花了好一会儿才弄好,故此处做个备忘。
@RunWith(SpringRunner.class)
@SpringBootTest
@WebAppConfiguration
//指定创建容器时使用哪个配置文件
public class UserControllerTest {