-
카테고리
-
세부 분야
백엔드
-
해결 여부
미해결
WebTestClient 를 주입받을때
19.04.02 15:15 작성 조회수 289
3
안녕하세요. 작은 팁이지만....
intelliJ 에서
@AutowiredWebTestClient webTestClient;
이 코드에서 빈을 못찾겠다고 빨간줄이 그어져 있는 상태가 될 수 있습니다. 그 때
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@AutoConfigureWebTestClient
public class WebTestSampleControllerTest {
와 같이 @AutoConfigureWebTestClient 를 붙여주니 빨간줄이 사라지네요.
참고하세요~
답변을 작성해보세요.
0
0
답변 2