在单元测试时 , 会遇到切环境的测试的问题 , 记录在此

1
2
3
4
5
6
@RunWith(SpringRunner.class)
@SpringBootTest(classes = RuoYiApplication.class)
@ActiveProfiles(profiles = {"test","testdruid"})
@TestPropertySource(properties = {"spring.profiles.active=test,testdruid"})
public class MockDataTest {
}