feat: qna 페이지네이션 수정
This commit is contained in:
parent
4d479d702e
commit
a80fb528f6
@ -13,8 +13,8 @@ import java.util.List;
|
|||||||
@Repository
|
@Repository
|
||||||
public interface QnaRepository extends JpaRepository<Qna, Long> {
|
public interface QnaRepository extends JpaRepository<Qna, Long> {
|
||||||
|
|
||||||
List<Qna> findByLectureId(Long lecturerId);
|
//List<Qna> findByLectureId(Long lecturerId);
|
||||||
|
|
||||||
@Query("SELECT q FROM Qna q WHERE q.lecture.id = :lectureId ORDER BY q.createdAt DESC")
|
@Query("SELECT q FROM Qna q WHERE q.lecture.id = :lectureId ORDER BY q.createdAt DESC")
|
||||||
Page<Qna> findByLectureId(Long lectureId, Pageable pageable);
|
Page<Qna> findByLectureId(Long lectureId, Pageable pageable);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ spring.datasource.username=${USER_NAME}
|
|||||||
spring.datasource.password=${USER_PASSWORD}
|
spring.datasource.password=${USER_PASSWORD}
|
||||||
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
|
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
|
||||||
spring.jpa.database=mysql
|
spring.jpa.database=mysql
|
||||||
spring.jpa.hibernate.ddl-auto=create
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
spring.jpa.properties.hibernate.jdbc.time_zone=Asia/Seoul
|
spring.jpa.properties.hibernate.jdbc.time_zone=Asia/Seoul
|
||||||
management.endpoints.web.exposure.include=health,info
|
management.endpoints.web.exposure.include=health,info
|
||||||
|
Loading…
Reference in New Issue
Block a user