강의노트
관련 글 69
[exception]CommonExceptionResolver.java
강의노트/Spring
2013. 9. 4. 12:01
@Componentpublic class CommonExceptionResolver extends SimpleMappingExceptionResolver {@AutowiredMessageSource msg; @Overrideprotected ModelAndView doResolveException(HttpServletRequest request,HttpServletResponse response, Object handler, Exception ex) {// TODO Auto-generated method stubModelAndView mv = new ModelAndView();String url="";if(ex instanceof LoginException){//ex가 LoginException에 대한 ..
[WEB-INF]servlet-context.xml
강의노트/Spring
2013. 9. 4. 11:59
infrastructure --> in the /WEB-INF/views directory --> class="org.springframework.web.servlet.view.InternalResourceViewResolver"> up static resources in the ${webappRoot}/resources directory --> class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
[controller]UserController.java
강의노트/Spring
2013. 9. 4. 11:56
@Controller public class UserController { @Autowired IUserService userService; @RequestMapping(value="/", method=RequestMethod.GET) public String moveLoginPage(){ return "loginForm"; } @RequestMapping(value="/login.action", method=RequestMethod.POST) public String checkLogin(@ModelAttribute UserInfo user, Model model) throws SQLException, LoginException{ //사용자의 정보가 있는지 조회를 하는 기능을 호출 UserInfo uIn..