#. Problemhttps://www.acmicpc.net/problem/13913* The copyright in this matter is in BOJ #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to improve it #. Solve 이전 숨바꼭질 문제를 풀었다면 나..
#. Problemhttps://www.acmicpc.net/problem/16234* The copyright in this matter is in BOJ #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to improve it #. Solve 땅 크기의 범위는 (1 ≤ N ≤..
| 소개-- spring framework에서 JPA를 편리하게 사용할 수 있도록 지원하는 프로젝트 - CRUD 처리를 위한 공통 인터페이스 제공 - repository 개발 시 인터페이스만 작성하면 실행 시점에 스프링 데이터 JPA가 구현 객체를 동적으로 생성해서 주입 - 데이터 접근 계층을 개발할 때 구현 클래스 없이 인터페이스만 작성해도 개발을 완료할 수 있도록 지원 - 공통 메소드는 스프링 데이터 JPA가 제공하는 org.springframework.date.jpa.repository.JpaRepository 인터페이스에 count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save .. c.스프링 데이터 JPA 적용 - 공..
#. Problemhttps://www.acmicpc.net/problem/16918* The copyright in this matter is in BOJ #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to improve it #. Solve 봄버맨의 행동을 구현해보자. 행동..
| Native SQL JPQL은 표준 SQL이 지원하는 대부분의 문법과 SQL 함수들을 지원하지만특정 데이터베이스에 종속적인 기능은 지원하지 않음 (Ex.- 특정 데이터베이스만 지원하는 함수, 문법, SQL 쿼리 힌트- 인라인 뷰, UNION, INTERSECT- 스토어드 프로시저)- ... 다양한 이유로 JPQL을 사용할 수 없을 때,JPA는 Native SQL을 통해 SQL을 직접 사용할 수 있는 기능을 제공.- SQL을 개발자가 직접 정의- 네이티브 SQL 사용 시 엔티티를 조회하고, JPA가 지원하는 영속성 컨텍스트의 기능을 그대로 사용 가능 반면, JDBC API 사용 시 단순히 데이터의 나열을 조회 || 사용 ㅇ 결과 타입 정의1public Query createNativeQuery(Stri..
| QueryDSL - 쿼리언어를 코드로 작성할 수 있도록 해주는 오픈소스 프로젝트 - 데이터 조회 기능이 특화 Documentation ko-KR ver. || 설정 ㅇ 라이브러리 추가 및 환경설정 (pom.xml) - querydsl-jpa : QueryDSL JPA 라이브러리12345 com.querydsl querydsl-jpa ${querydsl.version}cs - querydsl-apt : 쿼리 타입 생성 시 필요한 라이브러리123456 com.querydsl querydsl-apt ${querydsl.version} providedcs 12345 org.slf4j slf4j-log4j12 1.6.1cs - 엔티티를 기반으로 쿼리 타입이라는 쿼리용 클래스를 생성1234567891011121..
| JPQL(Java Persistence Query Language) - 테이블이 아닌 엔티티 객체를 대상으로 검색하는 객체지향 쿼리- SQL을 추상화해서 특정 데이터베이스 SQL에 의존하지 않음- JPA는 JPQL을 분석한 후 적절한 SQL을 만들어 데이터베이스를 조회- 방언(Dialect)만 변경하면 JPQL을 수정하지 않고 자연스럽게 DB 변경 가능 > 회원 엔티티1234567@Entity(name = "Member")public class Member { @Column(name = "name") private String username; // ...}cs > JPQL- 엔티티 이름과 엔티티 객체의 필드 명으로 작성12String jpql = "select m from Member as m wh..