diff --git a/StudentInfoService/.gitignore b/DiscoveryService/.gitignore similarity index 100% rename from StudentInfoService/.gitignore rename to DiscoveryService/.gitignore diff --git a/StudentInfoService/.mvn/wrapper/MavenWrapperDownloader.java b/DiscoveryService/.mvn/wrapper/MavenWrapperDownloader.java similarity index 100% rename from StudentInfoService/.mvn/wrapper/MavenWrapperDownloader.java rename to DiscoveryService/.mvn/wrapper/MavenWrapperDownloader.java diff --git a/StudentInfoService/.mvn/wrapper/maven-wrapper.jar b/DiscoveryService/.mvn/wrapper/maven-wrapper.jar similarity index 100% rename from StudentInfoService/.mvn/wrapper/maven-wrapper.jar rename to DiscoveryService/.mvn/wrapper/maven-wrapper.jar diff --git a/StudentInfoService/.mvn/wrapper/maven-wrapper.properties b/DiscoveryService/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from StudentInfoService/.mvn/wrapper/maven-wrapper.properties rename to DiscoveryService/.mvn/wrapper/maven-wrapper.properties diff --git a/StudentInfoService/mvnw b/DiscoveryService/mvnw similarity index 100% rename from StudentInfoService/mvnw rename to DiscoveryService/mvnw diff --git a/StudentInfoService/mvnw.cmd b/DiscoveryService/mvnw.cmd similarity index 100% rename from StudentInfoService/mvnw.cmd rename to DiscoveryService/mvnw.cmd diff --git a/StudentInfoService/pom.xml b/DiscoveryService/pom.xml similarity index 72% rename from StudentInfoService/pom.xml rename to DiscoveryService/pom.xml index 7afa03d..408d6a2 100644 --- a/StudentInfoService/pom.xml +++ b/DiscoveryService/pom.xml @@ -8,23 +8,19 @@ 2.6.1 - fr.insa.mas - StudentInfoService + fr.insa.arm + DiscoveryService 0.0.1-SNAPSHOT - StudentInfoService - Example of collab + DiscoveryService + Discovery service of the INSA's rooms management application 11 - 2021.0.0 + 2021.0.0 - org.springframework.cloud - spring-cloud-starter-netflix-eureka-server - - - org.springframework.boot - spring-boot-starter-web + org.springframework.cloud + spring-cloud-starter-netflix-eureka-server @@ -33,8 +29,6 @@ test - - diff --git a/StudentInfoService/src/main/java/fr/insa/mas/StudentInfoService/StudentInfoServiceApplication.java b/DiscoveryService/src/main/java/fr/insa/arm/DiscoveryService/DiscoveryServiceApplication.java similarity index 55% rename from StudentInfoService/src/main/java/fr/insa/mas/StudentInfoService/StudentInfoServiceApplication.java rename to DiscoveryService/src/main/java/fr/insa/arm/DiscoveryService/DiscoveryServiceApplication.java index 9063892..15c288c 100644 --- a/StudentInfoService/src/main/java/fr/insa/mas/StudentInfoService/StudentInfoServiceApplication.java +++ b/DiscoveryService/src/main/java/fr/insa/arm/DiscoveryService/DiscoveryServiceApplication.java @@ -1,13 +1,13 @@ -package fr.insa.mas.StudentInfoService; +package fr.insa.arm.DiscoveryService; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication -public class StudentInfoServiceApplication { +public class DiscoveryServiceApplication { public static void main(String[] args) { - SpringApplication.run(StudentInfoServiceApplication.class, args); + SpringApplication.run(DiscoveryServiceApplication.class, args); } } diff --git a/DiscoveryService/src/main/resources/application.properties b/DiscoveryService/src/main/resources/application.properties new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/DiscoveryService/src/main/resources/application.properties @@ -0,0 +1 @@ + diff --git a/StudentInfoService/src/test/java/fr/insa/mas/StudentInfoService/StudentInfoServiceApplicationTests.java b/DiscoveryService/src/test/java/fr/insa/arm/DiscoveryService/DiscoveryServiceApplicationTests.java similarity index 64% rename from StudentInfoService/src/test/java/fr/insa/mas/StudentInfoService/StudentInfoServiceApplicationTests.java rename to DiscoveryService/src/test/java/fr/insa/arm/DiscoveryService/DiscoveryServiceApplicationTests.java index 1ed965f..2bb614b 100644 --- a/StudentInfoService/src/test/java/fr/insa/mas/StudentInfoService/StudentInfoServiceApplicationTests.java +++ b/DiscoveryService/src/test/java/fr/insa/arm/DiscoveryService/DiscoveryServiceApplicationTests.java @@ -1,10 +1,10 @@ -package fr.insa.mas.StudentInfoService; +package fr.insa.arm.DiscoveryService; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest -class StudentInfoServiceApplicationTests { +class DiscoveryServiceApplicationTests { @Test void contextLoads() { diff --git a/StudentInfoService/src/main/java/fr/insa/mas/StudentInfoService/model/StudentInfo.java b/StudentInfoService/src/main/java/fr/insa/mas/StudentInfoService/model/StudentInfo.java deleted file mode 100644 index e7fa9c5..0000000 --- a/StudentInfoService/src/main/java/fr/insa/mas/StudentInfoService/model/StudentInfo.java +++ /dev/null @@ -1,64 +0,0 @@ -package fr.insa.mas.StudentInfoService.model; - -public class StudentInfo { - - private static int compteur = 0; - private int id; - private String birthDate; - private String nom; - private String prenom; - - - public StudentInfo(String birthDate, String nom, String prenom) { - this.id = compteur; - compteur = compteur + 1; - this.birthDate = birthDate; - this.nom = nom; - this.prenom = prenom; - } - - public StudentInfo() { - - } - - - public int getId() { - return id; - } - - - public void setId(int id) { - this.id = id; - } - - - public String getBirthDate() { - return birthDate; - } - - - public void setBirthDate(String birthDate) { - this.birthDate = birthDate; - } - - - public String getNom() { - return nom; - } - - - public void setNom(String nom) { - this.nom = nom; - } - - - public String getPrenom() { - return prenom; - } - - - public void setPrenom(String prenom) { - this.prenom = prenom; - } - -} diff --git a/StudentInfoService/src/main/java/fr/insa/mas/StudentInfoService/resource/StudentInfoResource.java b/StudentInfoService/src/main/java/fr/insa/mas/StudentInfoService/resource/StudentInfoResource.java deleted file mode 100644 index 285df6a..0000000 --- a/StudentInfoService/src/main/java/fr/insa/mas/StudentInfoService/resource/StudentInfoResource.java +++ /dev/null @@ -1,27 +0,0 @@ -package fr.insa.mas.StudentInfoService.resource; - -import java.util.List; -import java.util.Arrays; - -import org.springframework.web.bind.annotation.*; - -import fr.insa.mas.StudentInfoService.model.StudentInfo; - -@RestController -@RequestMapping("/student") -public class StudentInfoResource { - - private List etudiants = Arrays.asList( - new StudentInfo("28-04-1999", "Faure", "Paul"), - new StudentInfo("16-05-2000", "Giusti", "Laura"), - new StudentInfo("23-03-2000", "Duluc", "Célia"), - new StudentInfo("26-10-1999", "Garcia", "Helena") - ); - - @GetMapping("{idStudent}") - public StudentInfo getStudent(@PathVariable("idStudent") int id) { - System.out.println("C'est moi"); - return etudiants.get(id); - } - -} diff --git a/StudentInfoService/src/main/resources/application.properties b/StudentInfoService/src/main/resources/application.properties deleted file mode 100644 index e831a27..0000000 --- a/StudentInfoService/src/main/resources/application.properties +++ /dev/null @@ -1,2 +0,0 @@ -server.port 8083 -spring.application.name=studentInfoService \ No newline at end of file