반응형
250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- aws cicd
- chart.js
- VPN
- codedeploy
- 도커
- Flux
- bootstrap
- node
- IntelliJ
- Spring Error
- AWS CI/CD 구축하기
- codedeploy error
- or some instances in your deployment group are experiencing problems.
- PostgreSQL
- Python
- Spring
- docker
- Kafka
- aws
- Airflow
- JavaScript
- COALESCE
- Jenkins
- redis
- java bigdecimal
- codepipeline
- codebuild
- kubeflow
- SQL
- chartjs
Archives
- Today
- Total
Small Asteroid Blog
[spring jpa] repository 에서 가장 상위에 있는 id값 가져오기 본문
728x90
jpa 에서 id를 역순 정렬해 가장 상위에 있는 id 깂을 가져오고자 한다.
Top / First 어느것을 사용하던 결과는 동일하다.
public interface MemberEntityRepository extends JpaRepository<MemberEntity, Long> {
MemberEntity findFirstByOrderByIdDesc();
MemberEntity findTop1ByOrderByIdDesc();
}
728x90
반응형