feat: qna 페이지네이션 수정

This commit is contained in:
박정민 2024-08-12 09:21:49 +09:00
parent 4d479d702e
commit a80fb528f6
2 changed files with 3 additions and 3 deletions

View File

@ -13,8 +13,8 @@ import java.util.List;
@Repository
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")
Page<Qna> findByLectureId(Long lectureId, Pageable pageable);
}

View File

@ -21,7 +21,7 @@ spring.datasource.username=${USER_NAME}
spring.datasource.password=${USER_PASSWORD}
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
spring.jpa.database=mysql
spring.jpa.hibernate.ddl-auto=create
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.jdbc.time_zone=Asia/Seoul
management.endpoints.web.exposure.include=health,info