반응형
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 |
Tags
- codedeploy
- Spring
- redis
- chart.js
- 도커
- Jenkins
- Python
- codepipeline
- JavaScript
- aws
- SQL
- COALESCE
- Flux
- aws cicd
- Spring Error
- bootstrap
- docker
- codedeploy error
- codebuild
- Airflow
- VPN
- java bigdecimal
- kubeflow
- node
- PostgreSQL
- or some instances in your deployment group are experiencing problems.
- AWS CI/CD 구축하기
- chartjs
- IntelliJ
- Kafka
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
반응형