본문 바로가기

전체 글

(174)
[Spring] IntelliJ에서 lombok 어노테이션이 적용되지 않는 경우 개발 환경 IntelliJ, gradle, spring-boot ⌗ 오류 현상 IntelliJ에서 SpringBoot Framework를 사용한 프로젝트가 application 을 실행(Build)했을 때, cannot find symbol 과 같은 에러가 발생할 하는 경우 ⌗ 해결 방법 아래의 순서대로 해결을 하면 됩니다. 1 ) IntelliJ → preference → plugin 에서 lombok 검색 ⇢ lombok 플러그인 설치 2 ) IntelliJ → preference → Build,Execution,Deployment → Compiler → Annotation Processors ⇢ Enable annotation processing 체크 3 ) IntelliJ → File → Inva..
[Spring] Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object 오류 해결 ⌗ 오류 현상 warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type. ⌗ 해결 방법 import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper=false) public class TestDtoB extends TestDtoA { private String id; } @EqualsAndHashCode 어노테이..
[Spring] Cannot determine embedded database driver class for database type NONE 오류 해결 ⌗ 오류 현상 *************************** APPLICATION FAILED TO START *************************** Description: Cannot determine embedded database driver class for database type NONE Action: If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (the profiles "local" are currently activ..
[Spring] 빈 순환 참조로 인한 오류 해결 ⌗ 오류 현상 ************************** APPLICATION FAILED TO START *************************** Description: The dependencies of some of the beans in the application context form a cycle: testApplication ┌─────┐ | garbageRemoveServiceImpl defined in file [/Documents/DevSource/test/classes/com/example/service/TestA.class] ↑ ↓ | garbageCouponIssueServiceImpl defined in file[/Documents/DevSource/test/cl..
[Java][Mybatis] 테스트 코드 실행 중 org.mybatis.spring.MyBatisSystemException 오류 해결 ⌗ 오류 현상 11:49:08 com.test.service.serviceTest > sqlTest FAILED 11:49:08 org.mybatis.spring.MyBatisSystemException at serviceTest.java:57 11:49:08 Caused by: org.apache.ibatis.exceptions.PersistenceException at serviceTest.java:57 11:49:08 Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException at serviceTest.java:57 11:49:08 Caused by: java.sql.SQLException at serviceTest.java:57 11..
[Java][MyBatis] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 오류 해결 ⌗ 오류 현상 mybatis 테스트 코드 작성시 @MybatisTest 어노테이션을 붙였는거나 그 외에도 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 라고 에러가 날때. ⌗ 해결 방법 아래의 순서에 맞춰 해결하면 된다. ^0^ Mapper Interface와 mapping되는 xml파일에 오타가 있는 경우 (예시) id와 Interface에 메소드명이 일치하지 않는 경우 Build 파일이 갱신되지 않은 경우 classpath에 경로가 잘못된 경우 xml이 저장될 경로를 잘못 생성한 경우 DataBase confiure 파일을 찾지 못하는 경우 1 ) 대부분 이와 같은 에러가 발생하는데, 오타만 찾으면 금방 ..
[Java] 스레드 일시정지, Thread sleep /** * 특정 스레드 Loop당 1초 sleep 실행 */ @Slf4j public class mThread implements Runnable{ @Override public void run() { try { Thread.sleep(1000); } catch (InterruptedException e) { log.error(e.getMessage()); } // Thread가 실행중인 경우 종료 if (Thread.interrupted()) { Thread.currentThread().interrupt(); } } }
[Java] String 문자열 자르기 : substring() 이용 DB에 저장 데이터 타입이 text로, 저장할 데이터 길이가 정해져있기 때문에 글자 제한에 맞춰 데이터를 잘라서 저장해야 했다. text 타입이 65,535 bytes 이하의 값만 가능해서 일정 글자수 만큼 잘라서 사용하는 방법(substring)을 이용했다. public void setText(TextData textData) { String fullText = textData.getText(); // text 타입이 65,535 bytes 이하의 값만 가능 int max = 65535; int textSize = fullText.length(); int loopCnt = textLength / max + 1; for (int i = 0; i < loopCnt; i++) { int firstIndex ..

❥ CHATI Github