
실제 운영 환경에서는 Pageable 속성을 지정하여 메모리 아웃을 피해야 합니다. 1. 도메인 클래스 생성 @Setter @Getter @Table(name = "TB_DEMO") @AllArgsConstructor @NoArgsConstructor @Entity @Builder public class DemoEntity { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) private int id; private String title; private String content; } 2. Repository 생성 페이징 및 정렬을 하기 위해서는 ListPagingAndSortingRepository 또는 PagingAndSortingRepositor..
스프링 부트에서 로그는 log4j2, logbak을 사용하여 출력 할 수 있습니다. spring-boot-starter-log4j2 로깅을 위해 Log4j2를 사용하기 위한 스타터. spring-boot-starter-logging Logback을 사용하여 로깅하기 위한 스타터입니다. 기본 로깅 스타터 참고 : https://docs.spring.io/spring-boot/docs/3.1.2/reference/html/features.html#features.logging Core Features Spring Boot uses Commons Logging for all internal logging but leaves the underlying log implementation open. Default ..
1. RestClient 개발 참고 :https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/connecting.html Connecting | Elasticsearch Java API Client [8.9] | Elastic The Java API Client is structured around three main components: API client classes. These provide strongly typed data structures and methods for Elasticsearch APIs. Since the Elasticsearch API is large, it is structured in fe..
Mybatis는 SQL, 저장 프로시저를 자바 오브젝트에 매핑하는 것을 지원하는 SQL 매퍼 프레임워크 입니다. 참고 : MyBatis – 마이바티스 3 | 소개 MyBatis – 마이바티스 3 | 소개 마이바티스는 무엇인가? 마이바티스는 개발자가 지정한 SQL, 저장프로시저 그리고 몇가지 고급 매핑을 지원하는 퍼시스턴스 프레임워크이다. 마이바티스는 JDBC로 처리하는 상당부분의 코드와 mybatis.org 스프링 부트에서 MyBatis를 적용 1. 의존성 설정 mybatis-spring-boot-starter는 mybatis-spring-boot-autoconfigure, spring-boot-starter, spring-boot-starter-jdbc, mybatis-spring 의존성을 포함하고 있..

1. 종속성 1.1 gradle 종속성 runtimeOnly 'com.h2database:h2' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' 1.2 Maven 종속성 org.springframework.boot spring-boot-starter-data-jpa com.h2database h2 runtime 2. 데이터베이스 구성 SpringBoot에서 DB를 연결하기 위해서는 Application.yml 또는 application.properties에 속성을 추가 해야 합니다. spring: datasource: url: jdbc:h2:file:./data/demodb # 파일 저장소 username: sa passwor..