티스토리 뷰
@ComponentScan ((basePackages = {"WebMvcContextConfiguration이 들어가있는 패키지"})
를 실행하면
Error creating bean with name 'resourceHandlerMapping' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.springframework.web.servlet.HandlerMapping]:
Factory method 'resourceHandlerMapping' threw exception;
nested exception is java.lang.IllegalStateException: No ServletContext set
에러가 뜬다
해결방법: WebMvcContextConfiguration 없는 패키지 경로 설정 (dao, service)
'JAVA > Spring' 카테고리의 다른 글
jdbcTemplate multiple queries 에러 (0) | 2019.12.26 |
---|---|
[Spring] Service / Transaction (0) | 2019.10.14 |
[Spring] RowMapper (0) | 2019.10.12 |
[Spring] Connection Pool / Spring JDBC (0) | 2019.10.10 |
[Spring] Controller(Handler) (0) | 2019.10.09 |