diff --git a/UserFront/pom.xml b/UserFront/pom.xml index 902ec2b3..8cdb41c2 100644 --- a/UserFront/pom.xml +++ b/UserFront/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 1.5.4.RELEASE + 2.4.12 diff --git a/UserFront/src/main/java/com/userFront/service/UserServiceImpl/AppointmentServiceImpl.java b/UserFront/src/main/java/com/userFront/service/UserServiceImpl/AppointmentServiceImpl.java index 838ad223..0d62b84c 100644 --- a/UserFront/src/main/java/com/userFront/service/UserServiceImpl/AppointmentServiceImpl.java +++ b/UserFront/src/main/java/com/userFront/service/UserServiceImpl/AppointmentServiceImpl.java @@ -24,7 +24,7 @@ public List findAll() { } public Appointment findAppointment(Long id) { - return appointmentDao.findOne(id); + return appointmentDao.findById(id).orElse(null); } public void confirmAppointment(Long id) { diff --git a/UserFront/src/main/resources/application.properties b/UserFront/src/main/resources/application.properties index d7e04942..600be755 100644 --- a/UserFront/src/main/resources/application.properties +++ b/UserFront/src/main/resources/application.properties @@ -33,3 +33,6 @@ spring.jpa.hibernate.ddl-auto = update # Allows Hibernate to generate SQL optimized for a particular DBMS spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect +# Keep Boot 1.5 id generation (GenerationType.AUTO -> native/auto_increment) for existing schemas +spring.jpa.hibernate.use-new-id-generator-mappings = false + diff --git a/UserFront/src/test/java/com/userFront/UserFrontApplicationTests.java b/UserFront/src/test/java/com/userFront/UserFrontApplicationTests.java index 81fed97b..3e51f21d 100644 --- a/UserFront/src/test/java/com/userFront/UserFrontApplicationTests.java +++ b/UserFront/src/test/java/com/userFront/UserFrontApplicationTests.java @@ -1,11 +1,8 @@ package com.userFront; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; -@RunWith(SpringRunner.class) @SpringBootTest public class UserFrontApplicationTests {