- 9-10
OneToMany? (안쓸수있으면 최대한 안쓰는걸로)
ManyToOne? (추천)
물리 DB는 many 테이블에 생김
- 10-11
(/springWebSecurity03OneToMany/src/test/java/com/green/nowon/SpringWebSecurity03ApplicationTests.java)
댓글작성
void 댓글저장() {}
void board를이용한댓글저장() {}
- 11-12
@Transactional ? 세션유지?
OneToMany
Board -> Reply 단방향
reply에 접근하는 controller도 BoardController에 만들어야 함 (ReplyController : X)
- 12-1
orElseThrow() : get과 같은 용도지만 'null이면 말고 null이 아니면 가지고 오세요~' 느낌
확실히 null이 아니거나 예외처리가 되어있으면 get을 써
- 2-3
로그인 후 이전페이지로 돌아가기 기능 구현
Spring Security / Servlet Applications / Architecture
https://docs.spring.io/spring-security/reference/servlet/architecture.html
RequestCache
(/springWebSecurity03OneToMany/src/main/java/com/green/nowon/security/SecurityConfig.java)
@Bean
public AuthenticationSuccessHandler mySuccessHandler() {
return new MySuccessHandler();
}
(/springWebSecurity03OneToMany/src/main/java/com/green/nowon/security/MySuccessHandler.java)
- 3-5
로그인 성공시 이전페이지로 이동
@Log4j2 ?
- 5-6
[Spring] - 로깅: Log4j, Log4j2, Slf4j, Logback
https://zzang9ha.tistory.com/387
Gradle Tasks 탭 > build
Gradle Executions
E:\kdt\spring\springWebSecurity03OneToMany\build\libs에 WAR 파일 두개 생김
springWebSecurity03OneToMany-0.0.1-SNAPSHOT.war --톰캣내장(서버 컨트롤 가능해야함)
springWebSecurity03OneToMany-0.0.1-SNAPSHOT-plain.war --서버별도
여러대의 서버가 유기적으로 돌아갈땐 plain 사용 고려
'개발일기' 카테고리의 다른 글
학원 수업 66일차 221123 (0) | 2023.04.28 |
---|---|
학원 수업 65일차 221122 (0) | 2023.04.28 |
학원 수업 64일차 221121 (0) | 2023.04.27 |
학원 수업 63일차 221118 (0) | 2023.04.27 |
학원 수업 61일차 221116 (0) | 2023.04.27 |
학원 수업 60일차 221115 (0) | 2023.04.27 |
학원 수업 59일차 221114 (2) | 2023.04.27 |
학원 수업 58일차 221111 (0) | 2023.04.27 |
댓글