From c6e0aa036a232d17e5d121e35810d5cd2f8c627d Mon Sep 17 00:00:00 2001 From: Sana EL HIRI Date: Fri, 25 Feb 2022 18:53:57 +0100 Subject: [PATCH] ajout crossOrgins sur mail --- src/main/java/fr/organizee/controller/MailController.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/fr/organizee/controller/MailController.java b/src/main/java/fr/organizee/controller/MailController.java index 3543668..5df737e 100644 --- a/src/main/java/fr/organizee/controller/MailController.java +++ b/src/main/java/fr/organizee/controller/MailController.java @@ -4,14 +4,12 @@ import fr.organizee.model.Mail; import fr.organizee.service.SendMailService; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.mail.MessagingException; @RestController +@CrossOrigin("*") @RequestMapping("/sendmail") public class MailController { SendMailService service;