JPA를 이용해서 Pageable 를 사용하다가 이상한 에러가 나서 포스팅을 합니다.
에러문구가 No property EntityName 이렇게 나오더라구요.
근데 알고 봤더니 JPA Repository 에서 함수를 선언할때 제가 마음대로 함수를 만들어서 그렇게 된거였어요.
JPA Respository 에서 함수에 대한 설명이 잘되어있는 곳
https://www.netsurfingzone.com/jpa/how-to-write-custom-method-in-repository-in-spring-data-jpa/
How to write custom method in repository in Spring Data JPA
How to write custom method in the repository in Spring Data JPA. Rules to define query/repository method using different keywords.
www.netsurfingzone.com
https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#reference
Spring Data JPA - Reference Documentation
Example 109. 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
JPA LocalDateTime format 적용하기 (0) | 2022.01.06 |
---|---|
Java 8 date/time type `java.time.LocalDateTime` not support (0) | 2022.01.06 |
linux jar 파일 백그라운드 실행 방법 (0) | 2022.01.01 |
Spring properties 에 있는 값 가져오기 (0) | 2021.12.24 |
No auto configuration classes found in META-INF/spring.factories jar 실행 오류 (0) | 2021.12.20 |