
DispatcherServlet (Front Controller) 이름에 Servlet이 있다시피 DispatcherServlet은 Servlet이고, HttpServlet을 상속 받는다.DispatcherServlet -> FrameworkServlet -> HttpServletBean -> HttpServlet 스프링 부트는 DispatcherServlet을 Servlet으로 등록할때 모든 경로 (urlPattern = "/") 으로 매핑해서 등록한다. DispatcherServlet 은 Spring MVC에서 Front Controller 역할을 한다. Front Controller Pattern 이란 클라이언트에서 요청온 요청들을 처리하는 컨트롤러들의 공통적인 부분들을 모아서 Front Cont..

컨트롤러에서 발생한 익셉션을 특정 메서드가 처리하도록 하는 방법. @ExceptionHandler 컨트롤러에 @ExceptionHandler을 적용한 메서드가 존재한다면 해당 메서드가 해당 익셉션을 처리한다 MemberDetailController.java package spring; import org.springframework.beans.TypeMismatchException; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web..

경로의 일부가 고정되어 있지 않고 달라질때 매핑 메서드에서 이를 어떻게 처리 할수 있을까? 예를들어 다음 url을 보자. http://localhost:8080/sp5-chap14/members/10 마지막에 10이 멤버의 번호를 나타내고 각 맴버 경로마다 해당 숫자가 달라진다고 하면, 컨트롤러에서 해당 하는 번호를 어떻게 처리할수 있을까? MemberDetailController.java package spring; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.sprin..

날짜를 이용한 회원 검색 기능, @DateTimeFormat 목표는 두 개의 날짜를 입력하면 그 사이에 가입한 회원들의 목록을 출력하는 것이다. 우선 MemberDao 클래스에 selectByRegdate() 메서드를 추가한다. memberDao.java // 날짜를 이용한 회원 검색 // REGDATE가 from과 to 사이인 member 목록 리턴 public List selectByRegdate( LocalDateTime from, LocalDateTime to) { List results = jdbcTemplate.query( "select * from MEMBER where REGDATE between ? and ? " + "order by REGDATE desc", new RowMapper()..
- Total
- Today
- Yesterday
- 재귀
- Python
- db
- Kruskal
- Unity
- CSS
- recursion
- BFS
- DP
- permutation
- binary search
- Tree
- dfs
- C++
- 이분탐색
- Brute Force
- two pointer
- priority queue
- Implementation
- floyd warshall
- MVC
- greedy
- C
- 자료구조
- Dijkstra
- graph
- back tracking
- Stack
- Spring
- 조합
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |