반응형
Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- KAFKA
- Redis Sentinel
- RabbitMQ
- spring cloud
- cassandra
- Hibernate
- Selenium
- MySQL
- JPA
- argo cd
- QueryDSL
- spring boot redis
- Spring Open Feign
- docker
- spring boot
- ChannelPipeline
- jmeter
- weblogic 10
- redis
- Netty
- Docker Compose
- mybatis
- netflix oss
- grafana
- docker-compose
- coalesce
- vue.js
- docker compose mysql
- WebLogic
- Airflow
Archives
- Today
- Total
IT.FARMER
Junit Test [A ServletContext is required to configure default servlet handling] 본문
Spring
Junit Test [A ServletContext is required to configure default servlet handling]
아이티.파머 2015. 11. 2. 15:00반응형
java.lang.IllegalArgumentException: A ServletContext is required to configure default servlet handling
단위 테스트 (Junit)중에 위와 같은 오류에 직면할수 있다.
테스트에서 사용하는 스프링 Root Context에 Controller가 포함된 경우에 발생될수 있다고 한다.
Compoment Scan 시 사용하는 Annotation에서 다음과 같이 Controller를 Compoment Scan에서 제외시킨다.
@ComponentScan(basePackages = "com.ctb.pilot", excludeFilters = {
@Filter(Configuration.class), @Filter(Controller.class) })
잊어 버릴까봐 적어둔다.
반응형
'Spring' 카테고리의 다른 글
Junit MvcMock , Transaction rollback (0) | 2016.01.17 |
---|---|
Spring RestTemplate / Connecter 예제 (0) | 2015.11.17 |
Spring RestTemplate Sample (0) | 2015.09.25 |
대용량 페이징 기법 (0) | 2014.08.07 |
Spring initBinder - @vaild / JSR 303 (0) | 2014.04.07 |