JAVA-11240 Moved spring-cloud to spring-cloud-modules
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
## Relevant Articles:
|
||||
|
||||
- [Dockerizing a Spring Boot Application](https://www.baeldung.com/dockerizing-spring-boot-application)
|
||||
@@ -1,23 +0,0 @@
|
||||
version: '2'
|
||||
services:
|
||||
message-server:
|
||||
build:
|
||||
context: docker-message-server
|
||||
dockerfile: Dockerfile
|
||||
image: message-server:latest
|
||||
ports:
|
||||
- 18800-18888:8888
|
||||
networks:
|
||||
- spring-cloud-network
|
||||
product-server:
|
||||
build:
|
||||
context: docker-product-server
|
||||
dockerfile: Dockerfile
|
||||
image: product-server:latest
|
||||
ports:
|
||||
- 19900-19999:9999
|
||||
networks:
|
||||
- spring-cloud-network
|
||||
networks:
|
||||
spring-cloud-network:
|
||||
driver: bridge
|
||||
@@ -1,25 +0,0 @@
|
||||
version: '2'
|
||||
services:
|
||||
message-server:
|
||||
container_name: message-server
|
||||
build:
|
||||
context: docker-message-server
|
||||
dockerfile: Dockerfile
|
||||
image: message-server:latest
|
||||
ports:
|
||||
- 18888:8888
|
||||
networks:
|
||||
- spring-cloud-network
|
||||
product-server:
|
||||
container_name: product-server
|
||||
build:
|
||||
context: docker-product-server
|
||||
dockerfile: Dockerfile
|
||||
image: product-server:latest
|
||||
ports:
|
||||
- 19999:9999
|
||||
networks:
|
||||
- spring-cloud-network
|
||||
networks:
|
||||
spring-cloud-network:
|
||||
driver: bridge
|
||||
@@ -1,4 +0,0 @@
|
||||
FROM openjdk:8-jdk-alpine
|
||||
MAINTAINER baeldung.com
|
||||
COPY target/docker-message-server-1.0.0.jar message-server.jar
|
||||
ENTRYPOINT ["java","-jar","/message-server.jar"]
|
||||
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>docker-message-server</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>docker-message-server</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung.spring.cloud</groupId>
|
||||
<artifactId>spring-cloud-docker</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
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
@@ -1,11 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
server.port=8888
|
||||
@@ -1,4 +0,0 @@
|
||||
FROM openjdk:8-jdk-alpine
|
||||
MAINTAINER baeldung.com
|
||||
COPY target/docker-product-server-1.0.0.jar product-server.jar
|
||||
ENTRYPOINT ["java","-jar","/product-server.jar"]
|
||||
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>docker-product-server</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>docker-product-server</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung.spring.cloud</groupId>
|
||||
<artifactId>spring-cloud-docker</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
package com.baeldung.spring.cloud.config.docker;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class DockerProductController {
|
||||
@GetMapping("/products")
|
||||
public String getMessage() {
|
||||
return "A brand new product";
|
||||
}
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
server.port=9999
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>spring-cloud-docker</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>spring-cloud-docker</name>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung.spring.cloud</groupId>
|
||||
<artifactId>spring-cloud</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>docker-message-server</module>
|
||||
<module>docker-product-server</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
Reference in New Issue
Block a user