본문 바로가기
개발일기

학원 수업 60일차 221115

by hhana 2023. 4. 27.
  • 9-10

게시글 작성

 

 

  • 10-11

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#appendix.query.method.predicate
게시글 조회, 정렬

 

 

  • 11-12

게시글 페이징

 

 

  • 12-1

colspan

spring data jpa 조회할때 어떤 키워드쓰지?
https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#appendix.query.method.subject

Optional?

 

 

  • 2-3

게시글 글쓰기, security 권한 적용
(/springWebSecurity03/src/main/java/com/green/nowon/security/SecurityConfig.java)

antMatchers(HttpMethod.POST,"/boards","/boards/write").hasRole("USER")

 

(/springWebSecurity03/src/main/resources/templates/board/write.html)
https://docs.spring.io/spring-security/reference/6.0.0-M1/reactive/exploits/csrf.html#webflux-csrf-include-form-attr

CsrfToken Request Attribute

<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>

https://velog.io/@younghoondoodoom/CSRF-%ED%8C%8C%ED%97%A4%EC%B9%98%EA%B8%B0

 

 

  • 3-4

게시글 작성, 저장 기능 구현
https://docs.spring.io/spring-security/reference/servlet/authentication/architecture.html#servlet-authentication-authentication
principal - identifies the user. When authenticating with a username/password this is often an instance of UserDetails.

Authentication getPrincipal ?

 

 

  • 4-6

삭제 기능 구현

Expression-Based Access Control
https://docs.spring.io/spring-security/reference/servlet/authorization/expression-based.html

타임리프 Standard Expression Syntax
https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#standard-expression-syntax
Comparisons and equality:
Comparators: >, <, >=, <= (gt, lt, ge, le)
Equality operators: ==, != (eq, ne)

hasRole()
https://docs.spring.io/spring-security/reference/servlet/authorization/expression-based.html#el-common-built-in

Thymeleaf + Spring Security
https://www.thymeleaf.org/ecosystem.html#thymeleaf-spring-security

Thymeleaf spring security 사용하기
https://fknd12.tistory.com/54
(/springWebSecurity03/src/main/resources/templates/board/detail.html)

 

'개발일기' 카테고리의 다른 글

학원 수업 64일차 221121  (0) 2023.04.27
학원 수업 63일차 221118  (0) 2023.04.27
학원 수업 62일차 221117  (0) 2023.04.27
학원 수업 61일차 221116  (0) 2023.04.27
학원 수업 59일차 221114  (2) 2023.04.27
학원 수업 58일차 221111  (0) 2023.04.27
학원 수업 57일차 221110  (0) 2023.04.27
학원 수업 56일차 221109  (0) 2023.04.27

댓글