일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- spring builder
- JPA Update\
- react forwardRef
- react link
- 글자 넘침
- javascript 함수
- react quill custom
- javascript 기초
- editor Quill
- react Quill
- spring security
- react Page
- springbatch chunk
- Javascript
- spring
- Spring CORS
- Docker Windows 설치
- react jsx if
- 텍스트가 많은 경우
- Spring Controller return
- javascrpit 기초
- Spring Entity
- Spring JPA
- react
- step 테이블
- react react-router-dom v6
- springbatch
- SpringBatch 스키마
- Spring DTO
- JPA Insert
- Today
- Total
목록Java/SpringBoot (11)
천천히 알아보는 코딩공부
🔹 🚀 개념 정리 AuthenticationProviderOncePerRequestFilter언제 사용?주로 세션(Session) 기반 인증JWT 토큰 기반 인증역할로그인 요청 시 ID/PW 검증 및 세션 생성모든 요청에서 JWT 검증 및 인증 정보 저장어디에서 실행?AuthenticationManager가 호출할 때 실행 (/auth/login)HTTP 요청이 들어올 때마다 실행 (필터 체인에서 실행)Security 설정http.authenticationProvider(customAuthenticationProvider)http.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class)Spring Secu..
Spring Security Spring 기반의 애플리케이션의 보안(인증과 권한, 인가 등)을 담당하는 스프링 하위 프레임워크다. Spring Security는 인증과 권한에 대한 부분을 Filter 흐름에 따라 처리하고 있다. Filter는 Dispatcher Servlet으로 가기 전에 적용되므로 가장 먼저 URL 요청을 받지만, Interceptor는 Dispatcher와 Controller 사이에 위치한다는 점에서 적용 시기의 차이가 있다. Spring Security는 보안과 관련해서 체계적으로 많은 옵션을 제공해준다. [ 인증(Authentication)과 인가(Authorization) ] - 인증(Authentication): 해당 사용자가 본인이 맞는지를 확인하는 절차 - 인가(Autho..
Spring JPA Update 특정컬럼 변경 예제 Post 방식으로 구현하였다. AdminNoticeDto (DTO) @Getter @NoArgsConstructor public class AdminNoticeDto { private long id; @NotNull (message = "관리자 명을 입력해주세요") private String serviceName; @NotNull (message = "서비스 그룹을 입력해주세요") private String serviceGroup; @NotNull (message = "제목을 입력해주세요") private String title; @NotNull (message = "내용을 입력해주세요") private String content; private cha..
Spring JPA insert, Update 구현하는 예제 Post 방식으로 구현하였다. AdminNoticeDto (DTO) @Getter @NoArgsConstructor public class AdminNoticeDto { private long id; @NotNull (message = "관리자 명을 입력해주세요") private String serviceName; @NotNull (message = "서비스 그룹을 입력해주세요") private String serviceGroup; @NotNull (message = "제목을 입력해주세요") private String title; @NotNull (message = "내용을 입력해주세요") private String content; privat..
@Getter/@Setter 필드에 @Getter나 @Setter를 붙인다면, lombok이 해당 필드에 대한 기본 getter/setter를 생성해줍니다. @Getter @Setter public class BoardDTO { // TB_BOARD private Long idx;// 번호(PK) private String title;// 제목 private String content;// 내용 private String writer;// 작성자 private int viewCnt;// 조회수 private String noticeYn;// 공지 여부 private String secretYn;// 비밀 여부 private String deleteYn;// 삭제 여부 private LocalDateTim..
Entity는 Controller, Client단에서 쓰이면 직접 쓰이면 좋은 설계가 아니라고 한다. Entity는 Service -> Repository -> DB 상태로만 사용하는 것 같다. Entity DB에 저장하기 위해 유저가 정의한 클래스 실제 DB테이블과 매칭 @Getter @NoArgsConstructor @Table(name="admin") @Entity public class Member { @Id @GeneratedValue(strategy= GenerationType.AUTO) private long id; private String name; private String password; private String email; } DTO 데이터 전송 객체 DB에서 데이터를 얻어 Se..