From de9ddc906944f29d7d51cfc2c9d255152466c77d Mon Sep 17 00:00:00 2001 From: MatheusMariani Date: Fri, 9 Aug 2019 15:32:53 -0300 Subject: [PATCH] =?UTF-8?q?Sextou=20=C3=A9usguri?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../petclinic/product/ProductController.java | 14 ++++++++++++++ src/main/resources/application.properties | 1 + .../resources/templates/owners/findOwners.html | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) 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..e71b199bc --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/product/ProductController.java @@ -0,0 +1,14 @@ +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 "Hacker 2.0"; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index b93ff4de3..762e378fe 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -23,3 +23,4 @@ logging.level.org.springframework=INFO # Maximum time static resources should be cached spring.resources.cache.cachecontrol.max-age=12h +server.port = 8081 diff --git a/src/main/resources/templates/owners/findOwners.html b/src/main/resources/templates/owners/findOwners.html index 134e687fd..79df927d7 100644 --- a/src/main/resources/templates/owners/findOwners.html +++ b/src/main/resources/templates/owners/findOwners.html @@ -9,7 +9,7 @@ class="form-horizontal" id="search-owner-form">
- +