개발자의 공부방
-
환경 Mac M1 pro // OS Ventura 13.6 Intellij version Springboot 3.2 java 21 문제 클론 코딩 중 JPA Q class 생성 후 Import가 되지 않는 문제가 생겼습니다. 해결 시도 구글 검색 시 많은 방법이 나오는데 대부분 Intellij Project Structure 👉 Project Settings 👉 Modules 👉 Build 하위 generated 폴더를 Soures를 눌러서 잡는 방법이 많습니다. 하지만 저 같은 경우는 전혀 Import가 되지 않았습니다. 해결 과정 1) 디렉토리를 보면 알겠지만 QTodo라고 Q Class가 생성된게 보이긴 합니다만... 임포트가 되지 않습니다...?? 2) build.gradle 설정 def quer..
JPA] QClass import 안되는 문제환경 Mac M1 pro // OS Ventura 13.6 Intellij version Springboot 3.2 java 21 문제 클론 코딩 중 JPA Q class 생성 후 Import가 되지 않는 문제가 생겼습니다. 해결 시도 구글 검색 시 많은 방법이 나오는데 대부분 Intellij Project Structure 👉 Project Settings 👉 Modules 👉 Build 하위 generated 폴더를 Soures를 눌러서 잡는 방법이 많습니다. 하지만 저 같은 경우는 전혀 Import가 되지 않았습니다. 해결 과정 1) 디렉토리를 보면 알겠지만 QTodo라고 Q Class가 생성된게 보이긴 합니다만... 임포트가 되지 않습니다...?? 2) build.gradle 설정 def quer..
2024.02.28 -
스프링시큐리티를 적용하는 중에 아래와 같은 에러가 발생했다. 에러 메시지 *************************** APPLICATION FAILED TO START *************************** Description: The dependencies of some of the beans in the application context form a cycle: ┌─────┐ | webSecurityConfig defined in file [/Users/june/Repository/june/out/production/classes/toyblog/june/springbootdev/config/WebSecurityConfig.class] ↑ ↓ | userService defined ..
스프링시큐리티] 순환 참조 에러스프링시큐리티를 적용하는 중에 아래와 같은 에러가 발생했다. 에러 메시지 *************************** APPLICATION FAILED TO START *************************** Description: The dependencies of some of the beans in the application context form a cycle: ┌─────┐ | webSecurityConfig defined in file [/Users/june/Repository/june/out/production/classes/toyblog/june/springbootdev/config/WebSecurityConfig.class] ↑ ↓ | userService defined ..
2024.01.12 -
OAuth2를 적용하는 중에 인텔리제이에서 deprecated 됐다는 경고가 떠서 급하게 코드를 수정해보았습니다 동작은 동일한 코드지만 문법에서 차이가 있지만 크게 변화된건 없으니 쉽게 변경할 수 있었습니다! 코드 변경 전 public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.csrf().disable() .httpBasic().disable() .formLogin().disable() .logout().disable(); http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); http.addFilterBefore(token..
스프링시큐리티] http deprecated 리팩토링OAuth2를 적용하는 중에 인텔리제이에서 deprecated 됐다는 경고가 떠서 급하게 코드를 수정해보았습니다 동작은 동일한 코드지만 문법에서 차이가 있지만 크게 변화된건 없으니 쉽게 변경할 수 있었습니다! 코드 변경 전 public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.csrf().disable() .httpBasic().disable() .formLogin().disable() .logout().disable(); http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); http.addFilterBefore(token..
2024.01.12 -
지금까지 간단한 토이프로젝트를 하면서 record를 사용해봤습니다. 간단한 후기를 남겨보겠습니다. 레코드를 활용한 DTO 디렉토리 에러 상황 record를 사용하는 컨트롤러 @GetMapping("/article") public String newArticle(@RequestParam(name="id", required = false) Long id, Model model) { if(id == null) { model.addAttribute("article", new ArticleViewResponse()); // ! 에러 발생 } else { Article findById = blogService.findById(id); model.addAttribute("article", new ArticleView..
JAVA] DTO를 record로 이용해 만들어 봤다 feat. 사용후기지금까지 간단한 토이프로젝트를 하면서 record를 사용해봤습니다. 간단한 후기를 남겨보겠습니다. 레코드를 활용한 DTO 디렉토리 에러 상황 record를 사용하는 컨트롤러 @GetMapping("/article") public String newArticle(@RequestParam(name="id", required = false) Long id, Model model) { if(id == null) { model.addAttribute("article", new ArticleViewResponse()); // ! 에러 발생 } else { Article findById = blogService.findById(id); model.addAttribute("article", new ArticleView..
2023.12.27 -
서론 최근(?) 자바 & 스프링의 업데이트로 인해서 기본적인 환경이 변화되고 있습니다. 스프링부트3.0가 되면서 자바의 기본버전도 17부터로 변경됐고 자바 17에서는 기존에 람다와 var와 같은 각종 추가된 새로운 기능도 추가됐습니다. 클론 코딩 및 토이 프로젝트를 진행하다 기본적인 DTO 생성 시 Class 에서 record로 변경을 해봤는데 기본적인 이해를 해보고 적용해본 후기를 적어보고자 합니다. 레코드의 문법 설명은 건너뛰겠습니다. 문법 참고 사이트 더보기 Java 14 Record Keyword | Baeldung Java 14 Record Keyword | Baeldung Explore the fundamentals of records, including their purpose, genera..
자바] record를 써보자 feat. DTO서론 최근(?) 자바 & 스프링의 업데이트로 인해서 기본적인 환경이 변화되고 있습니다. 스프링부트3.0가 되면서 자바의 기본버전도 17부터로 변경됐고 자바 17에서는 기존에 람다와 var와 같은 각종 추가된 새로운 기능도 추가됐습니다. 클론 코딩 및 토이 프로젝트를 진행하다 기본적인 DTO 생성 시 Class 에서 record로 변경을 해봤는데 기본적인 이해를 해보고 적용해본 후기를 적어보고자 합니다. 레코드의 문법 설명은 건너뛰겠습니다. 문법 참고 사이트 더보기 Java 14 Record Keyword | Baeldung Java 14 Record Keyword | Baeldung Explore the fundamentals of records, including their purpose, genera..
2023.12.20