From 8cf27b7b64b993afae89584b5f6b82157e3451f2 Mon Sep 17 00:00:00 2001 From: Yohan Boujon Date: Mon, 23 Dec 2024 00:15:18 +0100 Subject: [PATCH] Added feedback-service --- backend/feedback-service/pom.xml | 56 +++++++++++++++++++ .../rest/FeedbackServiceApplication.java | 36 ++++++++++++ backend/pom.xml | 1 + 3 files changed, 93 insertions(+) create mode 100644 backend/feedback-service/pom.xml create mode 100644 backend/feedback-service/src/main/java/insa/application/helpapp/rest/FeedbackServiceApplication.java diff --git a/backend/feedback-service/pom.xml b/backend/feedback-service/pom.xml new file mode 100644 index 0000000..ac4dba8 --- /dev/null +++ b/backend/feedback-service/pom.xml @@ -0,0 +1,56 @@ + + + insa.application.helpapp + helpapp + 1.0-SNAPSHOT + + 4.0.0 + feedback-service + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-data-jpa + + + mysql + mysql-connector-java + 8.0.33 + runtime + + + + insa.application.helpapp + database-manager + 1.0-SNAPSHOT + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 3.1.4 + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 21 + 21 + + + + + + diff --git a/backend/feedback-service/src/main/java/insa/application/helpapp/rest/FeedbackServiceApplication.java b/backend/feedback-service/src/main/java/insa/application/helpapp/rest/FeedbackServiceApplication.java new file mode 100644 index 0000000..5c37c72 --- /dev/null +++ b/backend/feedback-service/src/main/java/insa/application/helpapp/rest/FeedbackServiceApplication.java @@ -0,0 +1,36 @@ +package insa.application.helpapp.rest; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.beans.factory.annotation.Autowired; + +@SpringBootApplication +@RestController +public class FeedbackServiceApplication { + @Autowired + private AdministrationService administrationService; + + public static void main(String[] args) { + SpringApplication.run(FeedbackServiceApplication.class, args); + } + + // CORS Configuration + @Bean + public WebMvcConfigurer corsConfigurer() { + return new WebMvcConfigurer() { + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**").allowedOrigins("*") + .allowedMethods("POST", "PUT", "DELETE") + .allowedHeaders("*"); + } + }; + } + +} diff --git a/backend/pom.xml b/backend/pom.xml index 2bc1f84..1809468 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -9,6 +9,7 @@ database-manager + feedback-service request-service role-service user-service