일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- sql
- JPAmapping
- Open EntityManager
- OSIV
- JPA프록시
- 데이터베이트h2
- JPAproxy
- MySqlType
- Git
- spring
- 에이치투데이터베이스
- gitinitial
- 이해와 원리
- JDBC connection pool
- 임베디드타입
- springbootH2
- javageneric
- dockercmd
- springboot기본설정
- JPA Hint & Lock
- embededtype
- 스프링부트기본설정
- jpa
- httppie
- springbootproxy
- 자바제너릭
- 스프링부트
- jpqlquery
- JPA값타입
- 제이피큐엘쿼리
- Today
- Total
목록Java (40)
빡코
1. 사용자 정의 인터페이스 생성 public interface MemberRepositoryCustom { List findMemberCustom(); } 2. 사용자 정의 인터페이스를 구현할 구현 클래스 생성 @RequiredArgsConstructor public class MemberRepositoryImpl implements MemberRepositoryCustom { private final EntityManager em; @Override public List findMemberCustom() { return em.createQuery("select m from Member m") .getResultList(); } } * 사용자 정의 리포지토리 구현시, 구현 클래스 명명 규칙 JpaRep..
//Lock 힌트 @Lock(LockModeType.PESSIMISTIC_WRITE) List findLockByUsername(String username); @Test public void LockTest() throws Exception { //given Member member1 = memberRepository.save(new Member("member1", 10)); em.flush(); em.clear(); //when List result = memberRepository.findLockByUsername("member1"); } JPA HintJPA 쿼리힌트(SQL 힌트가아니라 JPA 구현체 하이버네이트에게 제공하는 힌트) //readOnly는 변경 감치 체크를 하지 않기 때문에, 업데이..
https://docs.spring.io/spring-data/jpa/docs/current/reference/html/ Spring Data JPA - Reference Documentation Example 119. Using @Transactional at query methods @Transactional(readOnly = true) interface UserRepository extends JpaRepository { List findByLastname(String lastname); @Modifying @Transactional @Query("delete from User u where u.active = false") void del docs.spring.io Member와 Team은 N:..
https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.limit-query-result Spring Data JPA - Reference Documentation Example 119. Using @Transactional at query methods @Transactional(readOnly = true) interface UserRepository extends JpaRepository { List findByLastname(String lastname); @Modifying @Transactional @Query("delete from User u where u.active = false") void del..

OverView package study.datajpa.repository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.*; import org.springframework.data.repository.query.Param; import study.datajpa.dto.MemberDto; import study.datajpa.entity.Member; import javax.persistence.Entity; import javax.persistence.LockModeType; import java..

기초설정 > Preferences Build, Execution, Deployment Build Tools Gradle > Build and run using: Gradle IntelliJ IDEA > Run tests using: Gradle IntelliJ IDEA 롬복 적용 1. Preferences plugin lombok 검색 실행 (재시작) 2. Preferences Annotation Processors 검색 Enable annotation processing 체크 (재시작) 3. 임의의 테스트 클래스를 만들고 @Getter, @Setter 확인 gradel 의존관계 보기 ./gradlew dependencies --configuration compileClasspath H2 database..