mvn package vs springboot:repackage

This commit is contained in:
Kai Yuan
2020-12-23 00:04:10 +01:00
parent 89d10ea819
commit 76778779dd
6 changed files with 85 additions and 0 deletions
@@ -0,0 +1,11 @@
package com.baeldung.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
@@ -0,0 +1,15 @@
package com.baeldung.demo;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class DemoRestController {
@GetMapping(value = "/welcome")
public ResponseEntity<String> welcomeEndpoint() {
return ResponseEntity.ok("Welcome to Baeldung Spring Boot Demo!");
}
}