본문 바로가기

Spring14

[Querydsl] java17 querydsl setting build.gradle plugins { id 'java' id 'org.springframework.boot' version '3.1.4' id 'io.spring.dependency-management' version '1.1.3' } group = 'study' version = '0.0.1-SNAPSHOT' java { sourceCompatibility = '17' } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' .. 2024. 2. 22.
[Spring/ Error] Web server failed to start. Port 8080 was already in use. 오류 : Web server failed to start. Port 9091 was already in use. 9091 포트가 이미 실행 중인데 스프링 프로젝트롤 또 실행할 경우 오류 발생 해결방법 : lsof -i tcp:{Port 번호} 의 결과로 나온 현재 Port로 실행중인 PID 번호 를 kill 해준다. sudo kill -9 {PID번호} 그리고 패스워드 입력 그러면 해당 Port로 실행 중인 프로세스를 죽일 수 있다. 참고 : https://dundung.tistory.com/148 2023. 10. 12.
[Spring/Error] No serializer found for class 오류 : No serializer found for class ... and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) Serialize : Object to JSON Deserialize : JSON to Object the default configuration of an ObjectMapper instance is to only access properties that are public fields or have public getters/setters. Jackson 라이브러리의 ObjectMapper는 Serialize 할.. 2023. 10. 10.
[IntelliJ/Spring] 단축키 모음 command + p : Parameter Info command + option + v : introduce Variable (반환 타입) option + enter : show Context Action command + option + n : inline 단축키 control + t : 검색 F2 : 오류 난 곳으로 이동 command + shift + T : 테스트 코드 만들기 option + enter : Assertions static으로 만들기 command + option + v : 타입 자동 완성 command + e : 히스토리 command + e + enter : 이전으로 돌아가기 command + option + M : extract method ctrl + r : 기존의 마지막 .. 2023. 8. 27.
[Spring/Error] ids for this class must be manually assigned before calling save(): Spring, JPA 사용 시 ids for this class must be manually assigned before calling save(): 에러 발생 save() 함수 호출 전 id 값이 설정되어 있어야 함을 의미. 해결방법 DB에서 id 값을 Auto Increment 로 했을 때 entity 에서도 @GeneratedValue 어노테이션이 설정되어 있어야 한다. 참고 : https://hangjastar.tistory.com/241 2023. 2. 1.
[Spring/Error] Not a managed type: class 명 error JPA 사용 시 Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: 에러 발생 해결방법 해당 class에 @Entity 어노테이션 추가 참고 : https://wakestand.tistory.com/742 2023. 1. 25.