您应该使用@PropertySource或@TestPropertySource加载application-test.properties
@RunWith(SpringJUnit4ClassRunner.class)@TestPropertySource(locations="classpath:application-test.properties")@ContextConfiguration(classes = {WebTests.ConfigurationClass.class, WebTests.ClassToTest.class})public class WebTests {}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)