본문 바로가기

에러/Spring

(4)
[에러] <Spring> status=405 코드 @RequestMapping(value = "/logout", method = RequestMethod.POST) public String loginPage(HttpSession session) { session.removeAttribute("memberID"); return "redirect:/"; } 내용 ◎ There was an unexpected error (type=Method Not Allowed, status=405). 원인 ◎ 브라우저와 컨트롤러의 method 지정 차이 해결 @RequestMapping(value = "/logout", method = RequestMethod.GET) public String loginPage(HttpSession session) { session..
[에러] <Spring> java.lang.IllegalArgumentException: Name for argument of type [java.lang.String]..... 코드 @RequestMapping(value = "/insertCart", method = RequestMethod.POST) public @ResponseBody boolean insertCart(CartDTO cartDTO, ProductDTO productDTO, Model model, HttpSession session, @RequestParam String productID, @RequestParam String productQuantity) { 내용 ◎ java.lang.IllegalArgumentException: Name for argument of type [java.lang.String] not specified, and parameter name information not avail..
[에러] <Spring> JdbcTemplate null pointer exception 에러 원인 ◎ 데이터 크롤링을 리스너로 움직이도록 설정해 놓았다. ◎ JdbcTemplate 초기화 타이밍 보다 크롤링이 움직이는 타이밍이 빠르다. ◎ JdbcTemplate 초기화되어 있지 않기에 쿼리문 수행이 불가능하다. 해결 ◎ 크롤링 리스너 맨 위에 DAO를 먼저 Autowired하도록 해준다. @Component public class CrawlingListener implements ApplicationListener { @Autowired private ProductDAO pDAO; @Override public void onApplicationEvent(ContextRefreshedEvent event) { crawling(); } @Repository("productDAO") public..
[에러] <Spring> Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' 내용 ◎ applicationContext.xml에 pointcut과 aspect를 등록한 후 실행 했더니 발생한 에러 10:35:28.070 [main] WARN org.springframework.context.support.GenericXmlApplicationContext -- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'boardDAO' defined in file [C:\JAVA_web_lecture_record_spring\day063\..