Initial commit
This commit is contained in:
		
							
								
								
									
										4
									
								
								base/admin/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								base/admin/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
FROM openjdk:8-jdk-alpine
 | 
			
		||||
ARG JAR_FILE=target/*.jar
 | 
			
		||||
COPY ${JAR_FILE} app.jar
 | 
			
		||||
ENTRYPOINT ["java","-jar","/app.jar"]
 | 
			
		||||
							
								
								
									
										77
									
								
								base/admin/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								base/admin/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
			
		||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 | 
			
		||||
  <modelVersion>4.0.0</modelVersion>
 | 
			
		||||
  <parent>
 | 
			
		||||
    <groupId>org.springframework.boot</groupId>
 | 
			
		||||
    <artifactId>spring-boot-starter-parent</artifactId>
 | 
			
		||||
    <version>2.2.5.RELEASE</version>
 | 
			
		||||
    <relativePath/>
 | 
			
		||||
  </parent>
 | 
			
		||||
  <groupId>com.example</groupId>
 | 
			
		||||
  <artifactId>admin</artifactId>
 | 
			
		||||
  <version>0.0.1-SNAPSHOT</version>
 | 
			
		||||
  <name>admin</name>
 | 
			
		||||
  <description>Demo project for Spring Boot</description>
 | 
			
		||||
  <properties>
 | 
			
		||||
    <java.version>1.8</java.version>
 | 
			
		||||
    <spring-boot-admin.version>2.2.1</spring-boot-admin.version>
 | 
			
		||||
  </properties>
 | 
			
		||||
  <dependencies>
 | 
			
		||||
    <dependency>
 | 
			
		||||
      <groupId>de.codecentric</groupId>
 | 
			
		||||
      <artifactId>spring-boot-admin-starter-server</artifactId>
 | 
			
		||||
      <version>2.2.2</version>
 | 
			
		||||
    </dependency>
 | 
			
		||||
    <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>
 | 
			
		||||
      <exclusions>
 | 
			
		||||
        <exclusion>
 | 
			
		||||
          <groupId>org.junit.vintage</groupId>
 | 
			
		||||
          <artifactId>junit-vintage-engine</artifactId>
 | 
			
		||||
        </exclusion>
 | 
			
		||||
      </exclusions>
 | 
			
		||||
    </dependency>
 | 
			
		||||
    <dependency>
 | 
			
		||||
      <groupId>org.springframework.cloud</groupId>
 | 
			
		||||
      <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
 | 
			
		||||
      <scope>compile</scope>
 | 
			
		||||
    </dependency>
 | 
			
		||||
    <dependency>
 | 
			
		||||
      <groupId>org.springframework.boot</groupId>
 | 
			
		||||
      <artifactId>spring-boot-starter-actuator</artifactId>
 | 
			
		||||
      <scope>compile</scope>
 | 
			
		||||
    </dependency>
 | 
			
		||||
  </dependencies>
 | 
			
		||||
  <dependencyManagement>
 | 
			
		||||
    <dependencies>
 | 
			
		||||
      <dependency>
 | 
			
		||||
        <groupId>de.codecentric</groupId>
 | 
			
		||||
        <artifactId>spring-boot-admin-dependencies</artifactId>
 | 
			
		||||
        <version>${spring-boot-admin.version}</version>
 | 
			
		||||
        <type>pom</type>
 | 
			
		||||
        <scope>import</scope>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
        <groupId>org.springframework.cloud</groupId>
 | 
			
		||||
        <artifactId>spring-cloud-dependencies</artifactId>
 | 
			
		||||
        <version>Hoxton.SR3</version>
 | 
			
		||||
        <type>pom</type>
 | 
			
		||||
        <scope>import</scope>
 | 
			
		||||
      </dependency>
 | 
			
		||||
    </dependencies>
 | 
			
		||||
  </dependencyManagement>
 | 
			
		||||
  <build>
 | 
			
		||||
    <plugins>
 | 
			
		||||
      <plugin>
 | 
			
		||||
        <groupId>org.springframework.boot</groupId>
 | 
			
		||||
        <artifactId>spring-boot-maven-plugin</artifactId>
 | 
			
		||||
      </plugin>
 | 
			
		||||
    </plugins>
 | 
			
		||||
  </build>
 | 
			
		||||
</project>
 | 
			
		||||
@@ -0,0 +1,15 @@
 | 
			
		||||
package com.example.admin;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.SpringApplication;
 | 
			
		||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
 | 
			
		||||
import de.codecentric.boot.admin.server.config.EnableAdminServer;
 | 
			
		||||
 | 
			
		||||
@SpringBootApplication
 | 
			
		||||
@EnableAdminServer
 | 
			
		||||
public class AdminServerApplication {
 | 
			
		||||
 | 
			
		||||
	public static void main(String[] args) {
 | 
			
		||||
		SpringApplication.run(AdminServerApplication.class, args);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										14
									
								
								base/admin/src/main/resources/application-docker.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								base/admin/src/main/resources/application-docker.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
spring.application.name = admin-server
 | 
			
		||||
server.port = 9090
 | 
			
		||||
 | 
			
		||||
# Eureka client config
 | 
			
		||||
eureka.client.serviceUrl.defaultZone  = http://eureka:8761/eureka
 | 
			
		||||
# eureka.client.instance.preferIpAddress = true
 | 
			
		||||
 | 
			
		||||
# Admin client config
 | 
			
		||||
spring.boot.admin.client.url=http://admin-server:9090
 | 
			
		||||
 | 
			
		||||
# Actuator
 | 
			
		||||
management.security.enabled = false
 | 
			
		||||
management.endpoints.web.exposure.include=*
 | 
			
		||||
management.endpoint.health.show-details=always
 | 
			
		||||
							
								
								
									
										14
									
								
								base/admin/src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								base/admin/src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
spring.application.name = admin-server
 | 
			
		||||
server.port = 9090
 | 
			
		||||
 | 
			
		||||
# Eureka client config
 | 
			
		||||
eureka.client.serviceUrl.defaultZone  = http://localhost:8761/eureka
 | 
			
		||||
# eureka.client.instance.preferIpAddress = true
 | 
			
		||||
 | 
			
		||||
# Admin client config
 | 
			
		||||
spring.boot.admin.client.url=http://localhost:9090
 | 
			
		||||
 | 
			
		||||
# Actuator
 | 
			
		||||
management.security.enabled = false
 | 
			
		||||
management.endpoints.web.exposure.include=*
 | 
			
		||||
management.endpoint.health.show-details=always
 | 
			
		||||
							
								
								
									
										4
									
								
								base/admin/src/main/resources/bootstrap-docker.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								base/admin/src/main/resources/bootstrap-docker.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
spring:
 | 
			
		||||
  cloud:
 | 
			
		||||
    config:
 | 
			
		||||
      uri: http://config-server:8888
 | 
			
		||||
							
								
								
									
										4
									
								
								base/admin/src/main/resources/bootstrap.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								base/admin/src/main/resources/bootstrap.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
spring:
 | 
			
		||||
  cloud:
 | 
			
		||||
    config:
 | 
			
		||||
      uri: http://localhost:8888
 | 
			
		||||
@@ -0,0 +1,13 @@
 | 
			
		||||
package com.example.admin;
 | 
			
		||||
 | 
			
		||||
import org.junit.jupiter.api.Test;
 | 
			
		||||
import org.springframework.boot.test.context.SpringBootTest;
 | 
			
		||||
 | 
			
		||||
@SpringBootTest
 | 
			
		||||
class DemoApplicationTests {
 | 
			
		||||
 | 
			
		||||
	@Test
 | 
			
		||||
	void contextLoads() {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										4
									
								
								base/config/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								base/config/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
FROM openjdk:8-jdk-alpine
 | 
			
		||||
ARG JAR_FILE=target/*.jar
 | 
			
		||||
COPY ${JAR_FILE} app.jar
 | 
			
		||||
ENTRYPOINT ["java","-jar","/app.jar","--trace"]
 | 
			
		||||
							
								
								
									
										72
									
								
								base/config/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								base/config/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,72 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
			
		||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 | 
			
		||||
  <modelVersion>4.0.0</modelVersion>
 | 
			
		||||
  <parent>
 | 
			
		||||
    <groupId>org.springframework.boot</groupId>
 | 
			
		||||
    <artifactId>spring-boot-starter-parent</artifactId>
 | 
			
		||||
    <version>2.2.5.RELEASE</version>
 | 
			
		||||
    <relativePath/>
 | 
			
		||||
  </parent>
 | 
			
		||||
  <groupId>com.example</groupId>
 | 
			
		||||
  <artifactId>config</artifactId>
 | 
			
		||||
  <version>0.0.1-SNAPSHOT</version>
 | 
			
		||||
  <name>config</name>
 | 
			
		||||
  <description>Demo project for Spring Boot</description>
 | 
			
		||||
  <properties>
 | 
			
		||||
    <java.version>1.8</java.version>
 | 
			
		||||
    <spring-cloud.version>Hoxton.SR3</spring-cloud.version>
 | 
			
		||||
  </properties>
 | 
			
		||||
  <dependencies>
 | 
			
		||||
    <dependency>
 | 
			
		||||
      <groupId>org.springframework.cloud</groupId>
 | 
			
		||||
      <artifactId>spring-cloud-config-server</artifactId>
 | 
			
		||||
    </dependency>
 | 
			
		||||
    <dependency>
 | 
			
		||||
      <groupId>org.springframework.boot</groupId>
 | 
			
		||||
      <artifactId>spring-boot-starter-test</artifactId>
 | 
			
		||||
      <scope>test</scope>
 | 
			
		||||
      <exclusions>
 | 
			
		||||
        <exclusion>
 | 
			
		||||
          <groupId>org.junit.vintage</groupId>
 | 
			
		||||
          <artifactId>junit-vintage-engine</artifactId>
 | 
			
		||||
        </exclusion>
 | 
			
		||||
      </exclusions>
 | 
			
		||||
    </dependency>
 | 
			
		||||
    <dependency>
 | 
			
		||||
      <groupId>org.springframework.cloud</groupId>
 | 
			
		||||
      <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
 | 
			
		||||
      <scope>compile</scope>
 | 
			
		||||
    </dependency>
 | 
			
		||||
    <dependency>
 | 
			
		||||
      <groupId>org.springframework.boot</groupId>
 | 
			
		||||
      <artifactId>spring-boot-starter-actuator</artifactId>
 | 
			
		||||
      <scope>compile</scope>
 | 
			
		||||
    </dependency>
 | 
			
		||||
  </dependencies>
 | 
			
		||||
  <dependencyManagement>
 | 
			
		||||
    <dependencies>
 | 
			
		||||
      <dependency>
 | 
			
		||||
        <groupId>org.springframework.cloud</groupId>
 | 
			
		||||
        <artifactId>spring-cloud-dependencies</artifactId>
 | 
			
		||||
        <version>${spring-cloud.version}</version>
 | 
			
		||||
        <type>pom</type>
 | 
			
		||||
        <scope>import</scope>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
        <groupId>org.springframework.cloud</groupId>
 | 
			
		||||
        <artifactId>spring-cloud-dependencies</artifactId>
 | 
			
		||||
        <version>Hoxton.SR3</version>
 | 
			
		||||
        <type>pom</type>
 | 
			
		||||
        <scope>import</scope>
 | 
			
		||||
      </dependency>
 | 
			
		||||
    </dependencies>
 | 
			
		||||
  </dependencyManagement>
 | 
			
		||||
  <build>
 | 
			
		||||
    <plugins>
 | 
			
		||||
      <plugin>
 | 
			
		||||
        <groupId>org.springframework.boot</groupId>
 | 
			
		||||
        <artifactId>spring-boot-maven-plugin</artifactId>
 | 
			
		||||
      </plugin>
 | 
			
		||||
    </plugins>
 | 
			
		||||
  </build>
 | 
			
		||||
</project>
 | 
			
		||||
@@ -0,0 +1,15 @@
 | 
			
		||||
package com.example.config;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.SpringApplication;
 | 
			
		||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
 | 
			
		||||
import org.springframework.cloud.config.server.EnableConfigServer;
 | 
			
		||||
 | 
			
		||||
@SpringBootApplication
 | 
			
		||||
@EnableConfigServer
 | 
			
		||||
public class ConfigServerApplication {
 | 
			
		||||
 | 
			
		||||
	public static void main(String[] args) {
 | 
			
		||||
		SpringApplication.run(ConfigServerApplication.class, args);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										29
									
								
								base/config/src/main/resources/application-docker.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								base/config/src/main/resources/application-docker.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
 | 
			
		||||
# Config server
 | 
			
		||||
spring.application.name = config-server
 | 
			
		||||
welcome.message = Welcome to Spring cloud config server
 | 
			
		||||
server.port = 8888
 | 
			
		||||
 | 
			
		||||
# Config repository
 | 
			
		||||
#spring.cloud.config.server.git.uri=${HOME}/Work/Dev/test-spring-boot/config
 | 
			
		||||
#SPRING_PROFILES_ACTIVE=native
 | 
			
		||||
#spring.cloud.config.server.native.searchLocations=file:///C:/configprop/
 | 
			
		||||
spring.profiles.include = native
 | 
			
		||||
spring.cloud.config.server.native.search-locations = classpath:config/common.yml, classpath:config/
 | 
			
		||||
 | 
			
		||||
# Eureka client config
 | 
			
		||||
eureka.client.serviceUrl.defaultZone  = http://eureka:8761/eureka
 | 
			
		||||
# eureka.client.instance.preferIpAddress = true
 | 
			
		||||
 | 
			
		||||
# Admin client config
 | 
			
		||||
spring.boot.admin.client.url=http://admin-server:9090
 | 
			
		||||
 | 
			
		||||
# Actuator
 | 
			
		||||
management.security.enabled = false
 | 
			
		||||
management.endpoints.web.exposure.include=*
 | 
			
		||||
management.endpoint.health.show-details=always
 | 
			
		||||
 | 
			
		||||
logging:
 | 
			
		||||
  level:
 | 
			
		||||
    ROOT: INFO
 | 
			
		||||
    org.springframework: TRACE
 | 
			
		||||
							
								
								
									
										23
									
								
								base/config/src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								base/config/src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
 | 
			
		||||
# Config server
 | 
			
		||||
spring.application.name = config-server
 | 
			
		||||
welcome.message = Welcome to Spring cloud config server
 | 
			
		||||
server.port = 8888
 | 
			
		||||
 | 
			
		||||
# Config repository
 | 
			
		||||
spring.profiles.include = native
 | 
			
		||||
spring.cloud.config.server.native.search-locations = classpath:config/common.yml, classpath:config/
 | 
			
		||||
#spring.cloud.config.server.git.uri=${HOME}/Work/Dev/test-spring-boot/config
 | 
			
		||||
#spring.cloud.config.server.native.searchLocations=file:///C:/configprop/
 | 
			
		||||
 | 
			
		||||
# Eureka client config
 | 
			
		||||
eureka.client.serviceUrl.defaultZone  = http://localhost:8761/eureka
 | 
			
		||||
# eureka.client.instance.preferIpAddress = true
 | 
			
		||||
 | 
			
		||||
# Admin client config
 | 
			
		||||
spring.boot.admin.client.url=http://localhost:9090
 | 
			
		||||
 | 
			
		||||
# Actuator
 | 
			
		||||
management.security.enabled = false
 | 
			
		||||
management.endpoints.web.exposure.include=*
 | 
			
		||||
management.endpoint.health.show-details=always
 | 
			
		||||
							
								
								
									
										25
									
								
								base/config/src/main/resources/config/common.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								base/config/src/main/resources/config/common.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# Eureka client config
 | 
			
		||||
eureka:
 | 
			
		||||
  client:
 | 
			
		||||
    serviceUrl:
 | 
			
		||||
      defaultZone: "http://eureka:8761/eureka"
 | 
			
		||||
 | 
			
		||||
# Admin client config
 | 
			
		||||
spring:
 | 
			
		||||
  boot:
 | 
			
		||||
    admin:
 | 
			
		||||
      client:
 | 
			
		||||
        url: "http://admin-server:9090"
 | 
			
		||||
 | 
			
		||||
# Actuator
 | 
			
		||||
management:
 | 
			
		||||
  security:
 | 
			
		||||
    enabled: false
 | 
			
		||||
  endpoints:
 | 
			
		||||
    web:
 | 
			
		||||
      exposure:
 | 
			
		||||
        include: "*"
 | 
			
		||||
    health:
 | 
			
		||||
      show-details: "always"
 | 
			
		||||
@@ -0,0 +1,25 @@
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# Eureka client config
 | 
			
		||||
eureka:
 | 
			
		||||
  client:
 | 
			
		||||
    serviceUrl:
 | 
			
		||||
      defaultZone: "http://eureka:8761/eureka"
 | 
			
		||||
 | 
			
		||||
# Admin client config
 | 
			
		||||
spring:
 | 
			
		||||
  boot:
 | 
			
		||||
    admin:
 | 
			
		||||
      client:
 | 
			
		||||
        url: "http://admin-server:9090"
 | 
			
		||||
 | 
			
		||||
# Actuator
 | 
			
		||||
management:
 | 
			
		||||
  security:
 | 
			
		||||
    enabled: false
 | 
			
		||||
  endpoints:
 | 
			
		||||
    web:
 | 
			
		||||
      exposure:
 | 
			
		||||
        include: "*"
 | 
			
		||||
    health:
 | 
			
		||||
      show-details: "always"
 | 
			
		||||
							
								
								
									
										25
									
								
								base/config/src/main/resources/config/hello-world-api.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								base/config/src/main/resources/config/hello-world-api.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# Eureka client config
 | 
			
		||||
eureka:
 | 
			
		||||
  client:
 | 
			
		||||
    serviceUrl:
 | 
			
		||||
      defaultZone: "http://localhost:8761/eureka"
 | 
			
		||||
 | 
			
		||||
# Admin client config
 | 
			
		||||
spring:
 | 
			
		||||
  boot:
 | 
			
		||||
    admin:
 | 
			
		||||
      client:
 | 
			
		||||
        url: "http://localhost:9090"
 | 
			
		||||
 | 
			
		||||
# Actuator
 | 
			
		||||
management:
 | 
			
		||||
  security:
 | 
			
		||||
    enabled: false
 | 
			
		||||
  endpoints:
 | 
			
		||||
    web:
 | 
			
		||||
      exposure:
 | 
			
		||||
        include: "*"
 | 
			
		||||
    health:
 | 
			
		||||
      show-details: "always"
 | 
			
		||||
@@ -0,0 +1,13 @@
 | 
			
		||||
package com.example.config;
 | 
			
		||||
 | 
			
		||||
import org.junit.jupiter.api.Test;
 | 
			
		||||
import org.springframework.boot.test.context.SpringBootTest;
 | 
			
		||||
 | 
			
		||||
@SpringBootTest
 | 
			
		||||
class DemoApplicationTests {
 | 
			
		||||
 | 
			
		||||
	@Test
 | 
			
		||||
	void contextLoads() {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										28
									
								
								base/docker-compose.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								base/docker-compose.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
---
 | 
			
		||||
version: '3.3'
 | 
			
		||||
 | 
			
		||||
services:
 | 
			
		||||
 | 
			
		||||
  eureka:
 | 
			
		||||
    build:
 | 
			
		||||
      context: eureka/
 | 
			
		||||
    environment:
 | 
			
		||||
    - spring_profiles_active=docker
 | 
			
		||||
    ports:
 | 
			
		||||
    - "8761:8761"
 | 
			
		||||
 | 
			
		||||
  admin-server:
 | 
			
		||||
    build:
 | 
			
		||||
      context: admin/
 | 
			
		||||
    environment:
 | 
			
		||||
    - spring_profiles_active=docker
 | 
			
		||||
    ports:
 | 
			
		||||
    - "9090:9090"
 | 
			
		||||
 | 
			
		||||
  config-server:
 | 
			
		||||
    build:
 | 
			
		||||
      context: config/
 | 
			
		||||
    environment:
 | 
			
		||||
    - spring_profiles_active=docker
 | 
			
		||||
    ports:
 | 
			
		||||
    - "8888:8888"
 | 
			
		||||
							
								
								
									
										4
									
								
								base/eureka/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								base/eureka/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
FROM openjdk:8-jdk-alpine
 | 
			
		||||
ARG JAR_FILE=target/*.jar
 | 
			
		||||
COPY ${JAR_FILE} app.jar
 | 
			
		||||
ENTRYPOINT ["java","-jar","/app.jar"]
 | 
			
		||||
							
								
								
									
										15
									
								
								base/eureka/HELP.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								base/eureka/HELP.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
# Getting Started
 | 
			
		||||
 | 
			
		||||
### Reference Documentation
 | 
			
		||||
For further reference, please consider the following sections:
 | 
			
		||||
 | 
			
		||||
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
 | 
			
		||||
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.2.5.RELEASE/maven-plugin/)
 | 
			
		||||
* [Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/2.2.5.RELEASE/reference/htmlsingle/#production-ready)
 | 
			
		||||
 | 
			
		||||
### Guides
 | 
			
		||||
The following guides illustrate how to use some features concretely:
 | 
			
		||||
 | 
			
		||||
* [Service Registration and Discovery](https://spring.io/guides/gs/service-registration-and-discovery/)
 | 
			
		||||
* [Building a RESTful Web Service with Spring Boot Actuator](https://spring.io/guides/gs/actuator-service/)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										66
									
								
								base/eureka/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								base/eureka/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,66 @@
 | 
			
		||||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 | 
			
		||||
	<modelVersion>4.0.0</modelVersion>
 | 
			
		||||
	<parent>
 | 
			
		||||
		<groupId>org.springframework.boot</groupId>
 | 
			
		||||
		<artifactId>spring-boot-starter-parent</artifactId>
 | 
			
		||||
		<version>2.2.5.RELEASE</version>
 | 
			
		||||
		<relativePath/> <!-- lookup parent from repository -->
 | 
			
		||||
	</parent>
 | 
			
		||||
	<groupId>com.example</groupId>
 | 
			
		||||
	<artifactId>eureka</artifactId>
 | 
			
		||||
	<version>0.0.1-SNAPSHOT</version>
 | 
			
		||||
	<name>eureka</name>
 | 
			
		||||
	<description>Demo project for Spring Boot</description>
 | 
			
		||||
 | 
			
		||||
	<properties>
 | 
			
		||||
		<java.version>1.8</java.version>
 | 
			
		||||
		<spring-cloud.version>Hoxton.SR3</spring-cloud.version>
 | 
			
		||||
	</properties>
 | 
			
		||||
 | 
			
		||||
	<dependencies>
 | 
			
		||||
		<dependency>
 | 
			
		||||
			<groupId>org.springframework.boot</groupId>
 | 
			
		||||
			<artifactId>spring-boot-starter-actuator</artifactId>
 | 
			
		||||
		</dependency>
 | 
			
		||||
		<dependency>
 | 
			
		||||
			<groupId>org.springframework.cloud</groupId>
 | 
			
		||||
			<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
 | 
			
		||||
		</dependency>
 | 
			
		||||
 | 
			
		||||
		<dependency>
 | 
			
		||||
			<groupId>org.springframework.boot</groupId>
 | 
			
		||||
			<artifactId>spring-boot-starter-test</artifactId>
 | 
			
		||||
			<scope>test</scope>
 | 
			
		||||
			<exclusions>
 | 
			
		||||
				<exclusion>
 | 
			
		||||
					<groupId>org.junit.vintage</groupId>
 | 
			
		||||
					<artifactId>junit-vintage-engine</artifactId>
 | 
			
		||||
				</exclusion>
 | 
			
		||||
			</exclusions>
 | 
			
		||||
		</dependency>
 | 
			
		||||
	</dependencies>
 | 
			
		||||
 | 
			
		||||
	<dependencyManagement>
 | 
			
		||||
		<dependencies>
 | 
			
		||||
			<dependency>
 | 
			
		||||
				<groupId>org.springframework.cloud</groupId>
 | 
			
		||||
				<artifactId>spring-cloud-dependencies</artifactId>
 | 
			
		||||
				<version>${spring-cloud.version}</version>
 | 
			
		||||
				<type>pom</type>
 | 
			
		||||
				<scope>import</scope>
 | 
			
		||||
			</dependency>
 | 
			
		||||
		</dependencies>
 | 
			
		||||
	</dependencyManagement>
 | 
			
		||||
 | 
			
		||||
	<build>
 | 
			
		||||
		<plugins>
 | 
			
		||||
			<plugin>
 | 
			
		||||
				<groupId>org.springframework.boot</groupId>
 | 
			
		||||
				<artifactId>spring-boot-maven-plugin</artifactId>
 | 
			
		||||
			</plugin>
 | 
			
		||||
		</plugins>
 | 
			
		||||
	</build>
 | 
			
		||||
 | 
			
		||||
</project>
 | 
			
		||||
@@ -0,0 +1,15 @@
 | 
			
		||||
package com.example.eureka;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.SpringApplication;
 | 
			
		||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
 | 
			
		||||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
 | 
			
		||||
 | 
			
		||||
@SpringBootApplication
 | 
			
		||||
@EnableEurekaServer
 | 
			
		||||
public class EurekaApplication {
 | 
			
		||||
 | 
			
		||||
	public static void main(String[] args) {
 | 
			
		||||
		SpringApplication.run(EurekaApplication.class, args);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,3 @@
 | 
			
		||||
eureka.client.registerWithEureka = false
 | 
			
		||||
eureka.client.fetchRegistry = false
 | 
			
		||||
server.port = 8761
 | 
			
		||||
							
								
								
									
										3
									
								
								base/eureka/src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								base/eureka/src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
eureka.client.registerWithEureka = false
 | 
			
		||||
eureka.client.fetchRegistry = false
 | 
			
		||||
server.port = 8761
 | 
			
		||||
@@ -0,0 +1,13 @@
 | 
			
		||||
package com.example.eureka;
 | 
			
		||||
 | 
			
		||||
import org.junit.jupiter.api.Test;
 | 
			
		||||
import org.springframework.boot.test.context.SpringBootTest;
 | 
			
		||||
 | 
			
		||||
@SpringBootTest
 | 
			
		||||
class EurekaApplicationTests {
 | 
			
		||||
 | 
			
		||||
	@Test
 | 
			
		||||
	void contextLoads() {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										24
									
								
								base/kubernetes/deployment-eureka.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								base/kubernetes/deployment-eureka.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
apiVersion: apps/v1
 | 
			
		||||
kind: Deployment
 | 
			
		||||
metadata:
 | 
			
		||||
  creationTimestamp: null
 | 
			
		||||
  labels:
 | 
			
		||||
    app: eureka
 | 
			
		||||
  name: eureka
 | 
			
		||||
spec:
 | 
			
		||||
  replicas: 1
 | 
			
		||||
  selector:
 | 
			
		||||
    matchLabels:
 | 
			
		||||
      app: eureka
 | 
			
		||||
  strategy: {}
 | 
			
		||||
  template:
 | 
			
		||||
    metadata:
 | 
			
		||||
      creationTimestamp: null
 | 
			
		||||
      labels:
 | 
			
		||||
        app: eureka
 | 
			
		||||
    spec:
 | 
			
		||||
      containers:
 | 
			
		||||
      - image: 10.202.117.54:5000/demo_eureka
 | 
			
		||||
        name: eureka
 | 
			
		||||
        resources: {}
 | 
			
		||||
status: {}
 | 
			
		||||
							
								
								
									
										14
									
								
								base/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								base/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
<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>
 | 
			
		||||
  <groupId>com.example</groupId>
 | 
			
		||||
  <artifactId>base</artifactId>
 | 
			
		||||
  <name>test-spring-boot</name>
 | 
			
		||||
  <version>1.0-SNAPSHOT</version>
 | 
			
		||||
  <packaging>pom</packaging>
 | 
			
		||||
  <modules>
 | 
			
		||||
    <module>eureka</module>
 | 
			
		||||
    <module>admin</module>
 | 
			
		||||
    <module>config</module>
 | 
			
		||||
  </modules>
 | 
			
		||||
</project>
 | 
			
		||||
		Reference in New Issue
	
	Block a user