전체 글 132

터미널에서 Git 저장소의 URL과 사용자 정보를 확인하는 명령어

터미널에서 Git 저장소의 URL과 사용자 정보를 확인하는 명령어는 다음과 같습니다. 1. Git 저장소 URL 확인 아래 명령어는 현재 작업 중인 Git 저장소의 원격 저장소(remote repository) URL을 보여줍니다. git remote -v 2. Git 사용자 정보 확인 아래 두 명령어는 각각 현재 Git 사용자의 이름과 이메일 주소를 보여줍니다. git config user.name git config user.email

skill/Git 2024.04.19

JPA 에러 JpaSystemException, IdentifierGenerationException

에러 발생 시, org.springframework.orm.jpa.JpaSystemException: ids for this class must be manually assigned before calling save(): … org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): … Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): … JPA @Id가 pk=auto increme..

skill/Java.Kotlin 2024.01.12

springboot @Scheduler 다중 서버에서 한번만 실행 : shedlock

springboot @Scheduler 이용 시, 서버가 여러개 돌아가면 각 서버마다 @Scheduler가 돌아가 중복 처리 됨. Shedlock을 사용하면 스케쥴러가 한 번만 실행 됨. pom.xml 의존성 추가 net.javacrumbs.shedlock shedlock-spring 2.2.0 net.javacrumbs.shedlock shedlock-provider-jdbc-template 2.1.0 config 추가 import net.javacrumbs.shedlock.core.LockProvider; import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider; import net.javacrumbs.shedlock..

skill/Java.Kotlin 2023.11.21

[Java] springframework get method request param 배열일 경우, 콤마가 배열로 나눠서 오는 경우 error

import org.springframework.beans.propertyeditors.CustomCollectionEditor; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bin..

skill/Java.Kotlin 2023.10.18

[mariadb] 컬럼 데이터에 ','를 row로 처리하기

* 컬럼 데이터에 ','를 row 컬럼로 처리하기 DB data row1 : 데이터1,데이터2,데이터3 row2 : 데이터4 row3 : 데이터5 ... (아래와 같이 표현) row1 : 데이터1 row2 : 데이터2 row3 : 데이터3 row4 : 데이터4 row5 : 데이터5 SELECT replace(SUBSTRING_INDEX(SUBSTRING_INDEX(your_column, ',', n.digit+1), ',', -1), ' ','') AS split_data FROM your_table JOIN (SELECT 0 AS digit UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3) n ON LENGTH(your_column) - LENGT..

DB/전체 2023.10.18

[Swawgger] GetMapping @RequestBody Error

Http Method : Get 으로 설정 후 Request Data를 @RequestBody로 설정하여 Json으로 처리 할 때, @Operation(summary = "목록 조회") @GetMapping (value="/list") public Object list ( @Valid @RequestBody ReqVo req) { ...... Swagger 화면 요청 시, 서버 에러 java.lang.StringIndexOutOfBoundsException: begin -1, end -1, length 329 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319) at java.base/java.lang.String.substring(St..

skill/Java.Kotlin 2023.08.24