diff --git a/Chapter9-1-3/eureka-server/pom.xml b/Chapter9-1-3/eureka-server/pom.xml new file mode 100644 index 0000000..3f01c31 --- /dev/null +++ b/Chapter9-1-3/eureka-server/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + + com.didispace + eureka-server + 1.0.0 + jar + + eureka-server + Spring Cloud project + + + org.springframework.boot + spring-boot-starter-parent + 1.3.5.RELEASE + + + + + UTF-8 + 1.8 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.cloud + spring-cloud-starter-eureka-server + + + + + + + + org.springframework.cloud + spring-cloud-dependencies + Brixton.RELEASE + pom + import + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + \ No newline at end of file diff --git a/Chapter9-1-3/eureka-server/src/main/java/com/didispace/Application.java b/Chapter9-1-3/eureka-server/src/main/java/com/didispace/Application.java new file mode 100644 index 0000000..414607d --- /dev/null +++ b/Chapter9-1-3/eureka-server/src/main/java/com/didispace/Application.java @@ -0,0 +1,15 @@ +package com.didispace; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; + +@EnableEurekaServer +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + new SpringApplicationBuilder(Application.class).web(true).run(args); + } + +} diff --git a/Chapter9-1-3/eureka-server/src/main/resources/application.properties b/Chapter9-1-3/eureka-server/src/main/resources/application.properties new file mode 100644 index 0000000..8dad723 --- /dev/null +++ b/Chapter9-1-3/eureka-server/src/main/resources/application.properties @@ -0,0 +1,6 @@ +server.port=1111 +#eureka.instance.hostname=localhost + +eureka.client.register-with-eureka=false +eureka.client.fetch-registry=false +eureka.client.serviceUrl.defaultZone=http://localhost:${server.port}/eureka/ \ No newline at end of file