From 5e56abffb400c0ef8aede95ceed79a68c20db450 Mon Sep 17 00:00:00 2001 From: Leonardo de Souza Faria Date: Tue, 20 Nov 2018 20:32:29 -0200 Subject: [PATCH] Adicionando controle de cors --- src/main/java/br/com/mantendoofoco/resource/TarefaResource.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/br/com/mantendoofoco/resource/TarefaResource.java b/src/main/java/br/com/mantendoofoco/resource/TarefaResource.java index baab015..28d2b9c 100644 --- a/src/main/java/br/com/mantendoofoco/resource/TarefaResource.java +++ b/src/main/java/br/com/mantendoofoco/resource/TarefaResource.java @@ -3,6 +3,7 @@ import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -14,6 +15,7 @@ import br.com.mantendoofoco.model.Tarefa; import br.com.mantendoofoco.repository.TarefaRepository; +@CrossOrigin @RestController @RequestMapping("/tarefas") public class TarefaResource {