Spring Framework ¶
Spring Security ¶
-
- UserDetail - User 객 기
- 그 기
- SecurityContextHolder
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); String name; if (principal instanceof UserDetails) { name = ((UserDetails)principal).getUsername(); } else { name = principal.toString(); }
- Spring dependency injection
public String write(@RequestParam("title") String title, @RequestParam("contents") String contents, Model model, Principal principal) { ... page.edit(contents, userRepository.get(principal.getName())); ... }
- SecurityContextHolder
- spring security tab library
- spring security 기 html/js .
- spring security 기 html/js .
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec" %> ... <sec:authorize ifAllGranted="ROLE_USER"> <input id="contents_edit" type="textarea" class="page_edit" value="${page.contents}" /> <a href="#" class="page_edit" id="save">save</a> </sec:authorize> ... <sec:authorize url="/login"> <a href="logout">Logout</a> </sec:authorize>
- Spring Security Role Voter "ROLE_" 근 . .
JSP ¶
Markdown ¶
- 고 구 Markdown 기 결.
- Markdown : wiki:Markdown
- 고 Java 구 Markdown implementation Pegdown .
- Markdown : wiki:Markdown
CGLIB ¶
- CGLIB (Code Generator Library) 기 공() 고 .
기 ¶
8 30 ¶
- 경
- 2? 까 1.5 개 기 감. 게까 기 그 고 ... .
- 게 !! 꿔 . 게 고 개 게 그게 개 고 기 기게 고 .
- 그 게 고
- 그 게 고
- TODO : write/delete security
- 2? 까 1.5 개 기 감. 게까 기 그 고 ... .
- 구기 .
- 구기 구기 Markdown (Markdown ) ( !) Markdown pegdown 기 경. Java 기 그 (GitHub 개) ....
- pegdown (new Pegdown().markdownToHTML(/* String */) 까 간 걸. 고 고 고개ㅋㅋ
- 결 각 경? . 결 기.
- 구기 구기 Markdown (Markdown ) ( !) Markdown pegdown 기 경. Java 기 그 (GitHub 개) ....
- 고개
- Mock 객 고 . 객 구 . 기 구 게. Mock 객 객 . 과 걸 금 까?
- 그 (그고 ) 게 . 과거 결 견 .
- 그 (그고 ) 게 . 과거 결 견 .
- Mock 객 고 . 객 구 . 기 구 게. Mock 객 객 . 과 걸 금 까?
- 결 결 겠.
- 공게 .
- Spring, Hibernate . CGLib, Spring Security, JSP, Session 겠.
- .
- Spring, Hibernate . CGLib, Spring Security, JSP, Session 겠.
- 기
- pegdown과 Markdown 까
- 간 걸. 구간 기 게.
- pegdown과 Markdown 까
- 구기 .
9 19 ¶
- 경
- . .....
- ( 9) jsp pageContext.getAttribute("page") Response page 10 pageContext.getRequst().getAttribute()( request.getAttribute) page . ? 겠.
- Scope 계 .
- Scope 계 .
- Jasper JSP java .
- home.jsp home_jsp.java
- home.jsp home_jsp.java
- . .....
9 20 ¶
- 경
- login.jsp 그 게 .
- 그 Remember me .
- 그 Remember me .
- save 고 .
- login.jsp 그 게 .
- 그 login, signup 게 고
- spring security tag library ifAllGranted, ifNotGranted .
- spring security tag library ifAllGranted, ifNotGranted .
- 그 view 기
- 경 게 결과 고, 게 까?
- GET .
- url mapping 게 ?
- pagdown page localhost:8080/simplewiki/ localhost:8080/ 꿔.
- localhost:8080/ 거 ?
- localhost:8080/ 거 ?
- ViewResolver? Intercept Handler?
- GET .
- 개 기고 . .
- mac eclipse tomcat 고 caltalina
- 그 login, signup 게 고
10 11 ¶
- 경
- Page User 계 고. Page History . history . 그 User id history 고 id 기 . 그 User id (password, e-mail..) .
- Page User 계 고. Page History . history . 그 User id history 고 id 기 . 그 User id (password, e-mail..) .
11 01 ¶
11 21 ¶
- 경
- Page History 기 기
- url "/" Page 기 Page history 기 기 .
- (page content view, page history view) (page view) subset Request 게 고 parameter 구 .
- (page content view, page history view) (page view) subset Request 게 고 parameter 구 .
- 게 OverLoading ResuestMapping Spring Ambiguous Mapping Exception .
- RequestMappingHandlerMapping { URL , methods= Method , params=[],headers=[],consumes=[],produces=[],custom=[]} Request 구고 .
- RequestMappingHandlerMapping { URL , methods= Method , params=[],headers=[],consumes=[],produces=[],custom=[]} Request 구고 .
- @RequestMapping 값 params . 게 RequestMapping .
- url "/" Page 기 Page history 기 기 .
- Login 고 Page
- Page History 기 기