springboot-web测试配置
文章目录
配置
@WebIntegrationTest(randomPort = true)
可以替代
@IntegrationTest(“server.port:0”)
@WebAppConfiguration
完整实例
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = DemoApplication.class)
@WebIntegrationTest
@ActiveProfiles("local")

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论