728x90 전체 글86 [Spring/JPA] OSIV와 open-in-view OSIV (Open Session In View)영속성 컨텍스트를 View 영역까지 열어두는 기능즉, View 에서도 지연로딩과 같은 영속성 컨텍스트의 특징을 사용할 수 있다.Spring Boot 에서 OSIV는 기본적으로 활성화된 상태이다.아무 설정하지 않고 어플리케이션을 실행하면 다음과 같은 WARN 메시지를 볼 수 있다. WARN 13132 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure s.. 2024. 8. 12. [Spring] @Bean, @Component, @Configuration 스프링 빈(Bean)Spring의 DI Container에 의해 관리되는 POJO(Plain Old Java Object) 빈 등록 방법 1. 빈 설정 파일(Bean Configuration File)에 직접 등록(@Configuration, @Bean) ▶ 설정 클래스에서 @Bean 어노테이션을 사용해 수동으로 스프링 컨테이너에 빈을 등록 ▶ @Bean을 사용하는 클래스에 @Configuration 사용하여 클래스에서 Bean을 등록하고자 함을 명시한다. @Configurationpublic class SpringConfig { private final MemberRepository memberRepository; public SpringConfig(MemberRepository membe.. 2024. 8. 9. [Visual Studio Code] vscode 파일 검색시(ctrl + p) 폴더 및 파일 제외 방법 File ▶ Preferences ▶ Settings ▶ Text Editor ▶ Files ▶ Exclude ▶ Add Pattern ▶ 검색 제외할 폴더 또는 파일 설정 2024. 8. 7. [Git] branch 명령어 local branch 조회git branch remote branch 조회git branch -r 전체 목록(local, remote) 보기git branch -a branch 이동git checkout [브랜치 이름] branch 생성git checkout -b [브랜치 이름]git branch [브랜치 이름] 이전 branch로 돌아가기git checkout - local branch 삭제git branch -d [브런치 이름] remote branch 삭제git push origin --delete [브랜치 이름] mergegit merge [브랜치 이름] merge 취소git merge --abort local branch 이름 변경git branch -m [old name] [new name].. 2024. 8. 5. [Spring Security] logout 할 때, GET /login?logout 해결 방법 발생하는 현상SecurityConfig에 있는 filterChain() 그리고 login과 logout을 다음과 같이 만들었다.@Configuration@RequiredArgsConstructorpublic class SecurityConfig { ... @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { ... .mvcMatchers("/members/signup", "/members/login", "/members/refreshToken").permitAll() // "/signup", "/login", "/users/refresh" .. 2024. 8. 2. JWT 토큰 JWT 구조▶ JSON 형태인 각 부분은 Base64 인코딩으로 표현되며, 각 부분을 이어주기 위해 . 을 사용하여 구분한다. Header 헤더 ▶ alg : Signature를 해싱하기 위한 알고리즘 지정 ex) HS256(SHA256), RSA ▶ typ : 토큰 타입 지정 ex) JWT Payload 내용 토큰에서 사용할 정보의 조각들인 클레임(Claim)이 담겨있다.클레임은 JSON(Key/Value) 형태의 한 쌍으로 이루어져 있다. 1. 등록된 클레임(Registered Claim)토큰 정보를 표현하기 위해 이미 정해진 종류의 데이터 1) iss : 토큰 발급자(issuer)2) sub : 토큰 제목(subject)3) aud : 토큰 대상자(audience)4) exp :.. 2024. 7. 31. 이전 1 ··· 9 10 11 12 13 14 15 다음 728x90