728x90 분류 전체보기252 mysite3예제 user&guest 부분 servlet-jsp에서 spring로 url 주소 2019. 2. 25. spring에서의 예외처리 https://github.com/jeongwoohyunn/mysite3-spring- catch 비워두는게 잴안좋은거라고 배웠다. + 회피해서 다른데 넣어주는것도 안좋다. 한번에 처리하기 1234567891011121314151617181920212223@ControllerAdvice //모든 오류가 여기로 몰린다.public class GlobalExceptionHandler { private static final Log LOG = LogFactory.getLog( GlobalExceptionHandler.class ); @ExceptionHandler(Exception.class) public ModelAndView handlerException( HttpServletRequest request,.. 2019. 2. 23. ViewResolver 설정 https://github.com/jeongwoohyunn/mysite3-spring- ViewResolver은 View이름을 가지고 View 오브젝트를 찾아준다. 빈 등록을 하지 않으면 전체경로를 다 적어주어야한다. 밑의 것을 넣어주어서 편하게 사용하자. spring-servlet에 넣어준다. 2019. 2. 23. spring html, css적용 안될때 https://github.com/jeongwoohyunn/mysite3-spring- spring에서 css,html,js에 파일 접근에 실패할때 이유는 DispatchServlet이 모든 URL처리에서 매핑을 하여서 DefaultServlet에 위임을 하지 못하기 때문에 spring -servlet.xml 파일에서 이런것두 있댄다. 그냥 같이 넣어주면 좋을듯. 2019. 2. 23. 이전 1 ··· 25 26 27 28 29 30 31 ··· 63 다음