사용자 도구

사이트 도구


springframework:springboot:test

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판 양쪽 다음 판
springframework:springboot:test [2020/07/08 13:40]
kwon37xi [Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test]
springframework:springboot:test [2020/07/08 13:40]
kwon37xi [Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test]
줄 20: 줄 20:
   * 테스트 ''resources''에 ''application.yml'' 필요(혹은 명시적 지정)   * 테스트 ''resources''에 ''application.yml'' 필요(혹은 명시적 지정)
   * ''@SpringBootTest(classes = config 클래스 목록 지정)''   * ''@SpringBootTest(classes = config 클래스 목록 지정)''
 +
 +<code java>
 +@SpringBootTest(classes = MyServiceConfig.class, webEnvironment = SpringBootTest.WebEnvironment.NONE)
 +@EnableAutoConfiguration
 +class OrderServiceApplicationTests {
 +
 +    @Test
 +    void contextLoads() {
 +    }
 +
 +}
 +</code>
  
 ===== @TestProperties ===== ===== @TestProperties =====
springframework/springboot/test.txt · 마지막으로 수정됨: 2022/08/31 16:02 저자 kwon37xi