Ver código fonte

Created MainController

wpfat23-5 3 anos atrás
pai
commit
849485becc

+ 4 - 0
pom.xml

@@ -33,6 +33,10 @@
 			<artifactId>spring-boot-starter-test</artifactId>
 			<scope>test</scope>
 		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-actuator</artifactId>
+		</dependency>
 	</dependencies>
 
 	<build>

+ 12 - 0
src/main/java/com/deliveryproject/easydelivery/MainController.java

@@ -0,0 +1,12 @@
+package com.deliveryproject.easydelivery;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class MainController {
+    @GetMapping("/")
+    public String index() {
+        return "Greetings from Spring Boot!";
+    }
+}