Java 4293 update dockerizing spring boot app article (#10512)
* JAVA-4293 Fix Dockerize Spring Boot article * JAVA-4293 Remove authentication / fix pom file Co-authored-by: mikr <michael.krimgen@ximedes.com>
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
package com.baeldung.spring.cloud.config.docker;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class DockerMessageController {
|
||||
@GetMapping("/messages")
|
||||
public String getMessage() {
|
||||
return "Hello from Docker!";
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.baeldung.spring.cloud.config.docker;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DockerServer {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DockerServer.class, args);
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
server.port=8888
|
||||
spring.security.user.name=root
|
||||
spring.security.user.password=docker!
|
||||
Reference in New Issue
Block a user