skill 79

터미널에서 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

[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

[Jenkins] Git 연동, FTP 연동 + 로그 확인

젠킨스 Git 연동 1. Jenkins > Dashboard > Jenkins 관리 > Security > Manage Credentials 클릭 2. (Manage Credentials) > Credentials > 목록의 Domain 클릭 > Global Credentails : [+ Add Credentials] 버튼 클릭 3. Jenkins > Dashboard > + 새로운 Item > Freestyle project 선택 4. (Freestyle project) > 소스 코드 관리 > Git 선택 Repository URL 입력, Credentials은 위의 (2.)에서 설정한 사용자 목록이 나옴, Branch 선택 5. (Freestyle project) > Build Steps > Add ..

skill/Git 2023.05.03

nohup 으로 jar 파일 실행 (spring, java 환경변수 추가, 실행/backup sh)

nohup으로 jar 파일 실행 nohup java -jar project-0.0.1-SNAPSHOT.jar nohup 실행 시, spring 환경 변수 추가 nohup java -jar -Dspring.profiles.active=publish project-0.0.1-SNAPSHOT.jar nohup 실행 시, java 환경 변수 추가 nohup java -jar -Dspring.profiles.active=publish -Djava.net.preferIPv4Stack=true project-0.0.1-SNAPSHOT.jar nohup 실행 sh #!/bin/bash PID=`ps -ef | grep jar | grep -v grep | awk '{print $2}'` echo $PID if [ -n..

skill/Linux 2023.03.31