diff --git a/BE/error/src/main/java/com/example/demo/schedule/persistence/ScheduleRepository.java b/BE/error/src/main/java/com/example/demo/schedule/persistence/ScheduleRepository.java index 9adb1200..7f146136 100644 --- a/BE/error/src/main/java/com/example/demo/schedule/persistence/ScheduleRepository.java +++ b/BE/error/src/main/java/com/example/demo/schedule/persistence/ScheduleRepository.java @@ -1,5 +1,6 @@ package com.example.demo.schedule.persistence; +import com.example.demo.schedule.application.model.ScheduleModel; import jakarta.persistence.Entity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; @@ -14,4 +15,7 @@ @Repository public interface ScheduleRepository extends JpaRepository { @Query("select p from ScheduleEntity p") Stream streamAll(); + + @Query("SELECT p.eventId, p.eventName, p.eventStartDate, p.createdDate FROM ScheduleEntity p") + List getYearCalendar(); } diff --git a/BE/error/src/main/resources/application.properties b/BE/error/src/main/resources/application.properties index 1b2a3377..0ba2f7ba 100644 --- a/BE/error/src/main/resources/application.properties +++ b/BE/error/src/main/resources/application.properties @@ -3,4 +3,4 @@ spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/example?serverTi spring.datasource.username=user spring.datasource.password=UserPassword spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQLDialect -cors.allow-origin.urls=http://localhost:5173 \ No newline at end of file +cors.allow-origin.urls=http://43.203.203.3 \ No newline at end of file