728x90 @SpringBootTest2 Spring boot 통합 Test @SpringBootTest > @SpringBootApplication을 찾아가서 모든 BeanScan진행 @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK) * junit4 기준 @RunWith와 같이 사용해야함 참고 : https://developing-countries.tistory.com/50?category=1023056 org.junit.runners.model.InvalidTestClassError org.junit.runners.model.InvalidTestClassError: Invalid test class 'com.example.studyspringboot.S.. 2022. 2. 20. Spring boot 외부 설정의 우선순위 우선순위 홈 디렉토리에 있는 spring-boot-dev-tools.properties 테스트에 있는 @TestPropertySource ex)@TestPropertySoruce(properties="SangGuk1") @SpringBootTest 의 properties attribute ex)@SpringBootTest(properties="SangGuk1") 정의해야할 properties가 많은 경우 @SpringBootTest(locations = "classpaath:/경로) 커맨드 라인 아규먼트 SPRING_APPLIVATION_JSON(환경 변수 또는 시스템 프로퍼티)에 들어있는 프로퍼티 ServletConfig 파라미터 ServletContext 파라미터 java:comp/env JNDI a.. 2022. 2. 5. 이전 1 다음 728x90