From 3aac648f80724c0b06659fac7c89a6ecdbb72529 Mon Sep 17 00:00:00 2001 From: cgsrjunior Date: Fri, 9 Aug 2019 15:33:26 -0300 Subject: [PATCH] =?UTF-8?q?#2=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?Controlador=20para=20produtos=20b=C3=A1sico.=20Exibe=20um=20Hel?= =?UTF-8?q?lo=20na=20tela?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../petclinic/product/ProductController.java | 13 +++++++++++++ src/main/resources/application.properties | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 src/main/java/org/springframework/samples/petclinic/product/ProductController.java diff --git a/src/main/java/org/springframework/samples/petclinic/product/ProductController.java b/src/main/java/org/springframework/samples/petclinic/product/ProductController.java new file mode 100644 index 000000000..6879b10b2 --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/product/ProductController.java @@ -0,0 +1,13 @@ +package org.springframework.samples.petclinic.product; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class ProductController { + + @GetMapping("/products") + public String showProductList(){ + return "Hello!"; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index b93ff4de3..d869d8426 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -23,3 +23,6 @@ logging.level.org.springframework=INFO # Maximum time static resources should be cached spring.resources.cache.cachecontrol.max-age=12h + +# Change server port +server.port=8081