목록Back-End (10)
인기쟁이 돌고래

hibernate-envers사용해서 History남기는 테이블이 있는데 update시에 오류가 난다 @_@? insert는 잘했는데... 나한테 왜그래 ㅠ_ㅠ 오류내용 일부 HHH000315: Exception executing batch [java.sql.BatchUpdateException: Duplicate entry '81981' for key 'PRIMARY'], SQL: insert into entity_aud (rev_type, a, b, c, d, e, f, id, rev_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?) Duplicate entry '81981' for key 'PRIMARY' Unable to perform beforeTransactionComple..
아래와 같은 함수를 만들고자 할때 "i%2" 와 같이 조건문만 변경되는데 함수가 2개나 나와야한다 (중복 코드많아짐) // 짝수만 골라내는 함수 public static List evenList(List input) { ArrayList result = new ArrayList(); for(int i : input) { if(i %2 == 0) result.add(i); } return result; } // 홀수만 골라내는 함수 public static List oddList(List input) { ArrayList result = new ArrayList(); for(int i : input) { if(i %2 == 1) result.add(i); } return result; } 저 조건문만 변경..

schema.sql / data.sql 을 통해 DB initialize를 진행하는데, SpringBoot-JPA 사용시 안먹는다! Why? Entity를 기준으로 자동으로 DDL이 생성되기 때문이다. application.properties 에 아래 옵션을 추가해주면 Entity를 통한 자동 DDL생성이 아닌 schema.sql / data.sql을 통해 초기DB값이 셋팅된다.

1. 기존 Java버전 확인 (예시는 16버전이 깔려있다) > java -version 2. 기존 환경변수 확인 (java관련 환경변수 없음 확인을 위함) > echo $PATH 3. 변경할 java 경로 확인 (예시는 8버전으로 변경할 예정) 4. 해당 경로 PATH등록 > export JAVA_HOME={본인경로} > export PATH=${PATH}:$JAVA_HOME/bin 5. PATH 등록된 내용확인 > echo $PATH 6. Java version변경 됐는지 확인 > java -version
https://www.oracle.com/java/technologies/oracle-java-archive-downloads.html

A problem occurred evaluating root project 'projectName'. > Plugin with id 'spring-boot' not found. plugin 이름이 spring-boot > org.springframework.boot 으로 변경되었다고한다 stackoverflow.com/questions/26577805/spring-boot-gradle-plugin-cant-be-found spring-boot gradle plugin can't be found I have a separate gradle script that is just adding spring-boot plugin. It looks like this: buildscript { repositories..