diff --git a/.gitignore b/.gitignore index 913d17f..c3b0517 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,5 @@ hs_err_pid* *.classpath *.project *.settings/* -/target/ \ No newline at end of file +/target/ +*/target/* \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..43116ed --- /dev/null +++ b/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + + soraka is a spring cloud sample. + + + + com.soraka + soraka + 1.0-SNAPSHOT + + + + 北有风雪 + https://gitee.com/beiyoufx/soraka + + + + + + + UTF-8 + UTF-8 + + UTF-8 + 1.2.7 + 4.2.2.RELEASE + 1.2.4 + 3.2.6 + 2.5.3 + 4.12 + 1.2.17 + 1.7.7 + 1.4.4 + 1.0.26 + 5.1.22 + 2.9.0 + + + + + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + false + + + + diff --git a/soraka-eureka/pom.xml b/soraka-eureka/pom.xml new file mode 100644 index 0000000..5d190e7 --- /dev/null +++ b/soraka-eureka/pom.xml @@ -0,0 +1,63 @@ + + + 4.0.0 + + com.soraka + soraka-eureka + 0.0.1-SNAPSHOT + jar + + soraka-eureka + soraka注册中心 + + + org.springframework.boot + spring-boot-starter-parent + 2.0.4.RELEASE + + + + + UTF-8 + UTF-8 + 1.8 + Finchley.SR1 + + + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-server + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/soraka-eureka/src/main/java/com/soraka/eureka/SorakaEurekaApplication.java b/soraka-eureka/src/main/java/com/soraka/eureka/SorakaEurekaApplication.java new file mode 100644 index 0000000..9e7bd90 --- /dev/null +++ b/soraka-eureka/src/main/java/com/soraka/eureka/SorakaEurekaApplication.java @@ -0,0 +1,20 @@ +package com.soraka.eureka; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; + +/** + * Soraka注册中心 + * + * @author yongjie.teng + * @date 2018/8/9 + * @package com.soraka.eureka + */ +@EnableEurekaServer +@SpringBootApplication +public class SorakaEurekaApplication { + public static void main(String[] args) { + SpringApplication.run(SorakaEurekaApplication.class, args); + } +} diff --git a/soraka-eureka/src/main/resources/application.yml b/soraka-eureka/src/main/resources/application.yml new file mode 100644 index 0000000..a712a13 --- /dev/null +++ b/soraka-eureka/src/main/resources/application.yml @@ -0,0 +1,16 @@ +spring: + application: + name: soraka-eureka + +server: + port: 8001 + +eureka: + instance: + hostname: localhost + preferIpAddress: true + instance-id: ${spring.cloud.client.ipAddress}:${server.port} + client: + registerWithEureka: false + fetchRegistry: false + diff --git a/soraka-eureka/src/test/java/com/soraka/eureka/SorakaEurekaApplicationTest.java b/soraka-eureka/src/test/java/com/soraka/eureka/SorakaEurekaApplicationTest.java new file mode 100644 index 0000000..4a7e286 --- /dev/null +++ b/soraka-eureka/src/test/java/com/soraka/eureka/SorakaEurekaApplicationTest.java @@ -0,0 +1,20 @@ +package com.soraka.eureka; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +/** + * @author yongjie.teng + * @date 2018/8/9 + * @package com.soraka.eureka + */ +@RunWith(SpringRunner.class) +@SpringBootTest +public class SorakaEurekaApplicationTest { + + @Test + public void contextLoads() { + } +}