목록Spring (23)
kenzi
oracle ojdbc6 11.2 이게 계속 안 붙어서 C드라이브 > 사용자 > 내 이름으로 된 폴더 > .m2 > repository > oracle > ojdbc6 > 11.2 > 이곳에 ojdbc6.jar파일을 넣어주고 > 이름을 ojdbc6-11.2로 바꿔주면서 버전을 맞췄다
org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type: class java.util.ArrayList] ---------------------> 타입변환해주는 컨버터를 찾을 수 없음 Json방식으로 타입변환해주는 라이브러리가 필요 mvn레포지터리 가서 Jackson databind를 pom.xml에 넣기
HandlerInterceptorAdapter를 상속받으면 preHandle(), postHandle(), afterCompletion을 오버라이딩할 수 있는데 차이가 뭔지 모르겠다 강사님은 preHandle은 조인포인트 전에 실행 postHandle은 조인 포인트 전에 실행, ModelAndView를 사용해서 조인포인트에 영향을 주는 것 이라고 하셨다 pre는 전이고 post는 후인데......???? 그래서 스프링 공식문서를 찾아보았다 https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#spring-web Web on Servlet Stack Spring Web MVC is the original web framew..
//web.xml encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 encodingFilter /* pom.xml이나 web.xml 수정할때 우측 하단 building 끝나고 다른 작업하기 building 되고 있는데 다른 거 하면 에러납니다...
나의 경우는 스프링 버전 바꿔서 확인할 상황이 있어서 pom.xml에서 스프링 버전을 바꿔줬는데 이 에러가 떳다 Maven이 깨져서 프로젝트명에서 우클릭 - Properties에서 Add - java build path entries- maven 선택했던듯 ...
@Controller는 @Component(빈 객체)의 기능을 기본으로 갖고 있지만 @RequestMapping과 같은 기능이 추가로 필요할 때 사용 @Component는 그 자체로 그냥 빈 객체임을 표시해주는 것 controller는 빈 객체이면서 url들어오면 메서드를 수행해야하므로 추가적으로 RequestMapping과 같은 기능이 필요함 => @Controller사용 공식문서에 이거 한번 나왔던거 같은데 https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#beans-annotation-config Core Technologies In the preceding scenario, using @Autowired wo..
//request.setAttribute와 유사한 기능 //1) @이용 -- 뷰에 recEventList가 보내지는 것 @ModelAttribute("recEventList") //recEventList는? ==> getRecommendedEventService메서드의 리턴값 recommendList public List recommend(){ return eventService.getRecommendedEventService(); } //getRecommendedEventService()메서드 public List getRecommendedEventService(){ List recommendList = new ArrayList(); //eventMap의 get메서드로 recommendList에 객체 ..

mvc흐름 1. 클라이언트의 요청이 DispatcherServlet에 전달 2. DispatcherServlet는 HandlerMapping을 사용해서 클라이언트의 요청이 전달될 Controller객체를 구한다 3. DispatcherServlet는 Controller객체의 hanldeRequest()메서드를 호출해서 클라이언트의 요청을 처리한다 4. Controller.handleRequest()메서드는 처리결과 정보를 담은 ModelAndView객체를 리턴한다 5. DispatcherServlet는 ViewResolver로부터 처리결과를 보여줄 View를 앞뒤에 경로를 붙여서 구한다 6. View는 클라이언트에 전송할 응답을 생성한다 처리 방법 1. 클라이언트의 요청을 받을 DispatcherServ..