diff --git a/eureka/eureka-java/.gitignore b/eureka/eureka-java/.gitignore
new file mode 100644
index 0000000..ba517bb
--- /dev/null
+++ b/eureka/eureka-java/.gitignore
@@ -0,0 +1,46 @@
+# Eclipse project files
+.project
+.classpath
+.settings
+
+# IntelliJ IDEA project files and directories
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# Build targets
+**/target/*
+
+# Mac-specific directory that no other operating system needs.
+.DS_Store
+
+# JVM crash logs
+hs_err_pid*.log
+
+dependency-reduced-pom.xml
+
+*/.unison.*
+
+# exclude docker-sync stuff
+.docker-sync
+*/.docker-sync
+
+# exclude vscode files
+.vscode/
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.factorypath
+
+# Maven ignore
+.flattened-pom.xml
+
+# misc
+*classes
+*.class
+.svn
+logs/
+lib/
+backup/
\ No newline at end of file
diff --git a/eureka/eureka-java/consumer/pom.xml b/eureka/eureka-java/consumer/pom.xml
new file mode 100644
index 0000000..d68cfcf
--- /dev/null
+++ b/eureka/eureka-java/consumer/pom.xml
@@ -0,0 +1,55 @@
+
+
+ 4.0.0
+
+ cn.polarismesh.examples
+ eureka-java-example
+ 1.0.0-SNAPSHOT
+
+
+ eureka-consumer
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ Hoxton.SR2
+ pom
+ import
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-client
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ cn.polarismesh.examples.eureka.consumer.EurekaConsumerApplication
+ ZIP
+
+
+
+
+ repackage
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eureka/eureka-java/consumer/src/main/java/cn/polarismesh/examples/eureka/consumer/Config.java b/eureka/eureka-java/consumer/src/main/java/cn/polarismesh/examples/eureka/consumer/Config.java
new file mode 100644
index 0000000..097c1a8
--- /dev/null
+++ b/eureka/eureka-java/consumer/src/main/java/cn/polarismesh/examples/eureka/consumer/Config.java
@@ -0,0 +1,16 @@
+package cn.polarismesh.examples.eureka.consumer;
+
+import org.springframework.cloud.client.loadbalancer.LoadBalanced;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.client.RestTemplate;
+
+@Configuration
+public class Config {
+ @LoadBalanced
+ @Bean
+ public RestTemplate restTemplate() {
+ return new RestTemplate();
+ }
+
+}
diff --git a/eureka/eureka-java/consumer/src/main/java/cn/polarismesh/examples/eureka/consumer/EurekaConsumerApplication.java b/eureka/eureka-java/consumer/src/main/java/cn/polarismesh/examples/eureka/consumer/EurekaConsumerApplication.java
new file mode 100644
index 0000000..4d11d96
--- /dev/null
+++ b/eureka/eureka-java/consumer/src/main/java/cn/polarismesh/examples/eureka/consumer/EurekaConsumerApplication.java
@@ -0,0 +1,32 @@
+package cn.polarismesh.examples.eureka.consumer;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestTemplate;
+
+@SpringBootApplication
+@RestController
+@EnableDiscoveryClient
+public class EurekaConsumerApplication {
+
+ private static final String PROVIDER_SERVICE_NAME = "eureka-provider-service";
+
+ @Autowired
+ private RestTemplate restTemplate;
+
+ @RequestMapping("/echo")
+ public String echo(@RequestParam String value) {
+ return restTemplate.getForObject(
+ String.format("http://%s/echo1?value=%s", PROVIDER_SERVICE_NAME, value), String.class);
+ }
+
+ public static void main(String[] args) {
+ SpringApplication.run(EurekaConsumerApplication.class, args);
+ }
+}
diff --git a/eureka/eureka-java/consumer/src/main/resources/application.yml b/eureka/eureka-java/consumer/src/main/resources/application.yml
new file mode 100644
index 0000000..cba982c
--- /dev/null
+++ b/eureka/eureka-java/consumer/src/main/resources/application.yml
@@ -0,0 +1,11 @@
+server:
+ port: 20002
+spring:
+ application:
+ name: eureka-consumer-service
+eureka:
+ instance:
+ lease-renew-interval-in-seconds: 3
+ client:
+ serviceUrl:
+ defaultZone: http://127.0.0.1:8761/eureka/
\ No newline at end of file
diff --git a/eureka/eureka-java/pom.xml b/eureka/eureka-java/pom.xml
new file mode 100644
index 0000000..4cab762
--- /dev/null
+++ b/eureka/eureka-java/pom.xml
@@ -0,0 +1,21 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.2.1.RELEASE
+
+
+ cn.polarismesh.examples
+ eureka-java-example
+ 1.0.0-SNAPSHOT
+ pom
+
+
+ consumer
+ provider
+
+
\ No newline at end of file
diff --git a/eureka/eureka-java/provider/pom.xml b/eureka/eureka-java/provider/pom.xml
new file mode 100644
index 0000000..ee7c994
--- /dev/null
+++ b/eureka/eureka-java/provider/pom.xml
@@ -0,0 +1,56 @@
+
+
+ 4.0.0
+
+
+ cn.polarismesh.examples
+ eureka-java-example
+ 1.0.0-SNAPSHOT
+
+ eureka-provider
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ Hoxton.SR2
+ pom
+ import
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-client
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ cn.polarismesh.examples.eureka.provider.EurekaProviderApplication
+ ZIP
+
+
+
+
+ repackage
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eureka/eureka-java/provider/src/main/java/cn/polarismesh/examples/eureka/provider/EurekaProviderApplication.java b/eureka/eureka-java/provider/src/main/java/cn/polarismesh/examples/eureka/provider/EurekaProviderApplication.java
new file mode 100644
index 0000000..3f0e96c
--- /dev/null
+++ b/eureka/eureka-java/provider/src/main/java/cn/polarismesh/examples/eureka/provider/EurekaProviderApplication.java
@@ -0,0 +1,23 @@
+package cn.polarismesh.examples.eureka.provider;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@SpringBootApplication
+@RestController
+@EnableDiscoveryClient
+public class EurekaProviderApplication {
+
+ @RequestMapping("/echo1")
+ public String echo1(@RequestParam String value) {
+ return "echo: " + value;
+ }
+
+ public static void main(String[] args) {
+ SpringApplication.run(EurekaProviderApplication.class, args);
+ }
+}
diff --git a/eureka/eureka-java/provider/src/main/resources/application.yml b/eureka/eureka-java/provider/src/main/resources/application.yml
new file mode 100644
index 0000000..114ab53
--- /dev/null
+++ b/eureka/eureka-java/provider/src/main/resources/application.yml
@@ -0,0 +1,11 @@
+server:
+ port: 20001
+spring:
+ application:
+ name: eureka-provider-service
+eureka:
+ instance:
+ lease-renew-interval-in-seconds: 3
+ client:
+ serviceUrl:
+ defaultZone: http://127.0.0.1:8761/eureka/
\ No newline at end of file