diff --git a/client/.gitignore b/client/.gitignore new file mode 100755 index 0000000..a2a3040 --- /dev/null +++ b/client/.gitignore @@ -0,0 +1,31 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/** +!**/src/test/** + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ + +### VS Code ### +.vscode/ diff --git a/client/pom.xml b/client/pom.xml new file mode 100755 index 0000000..330cc99 --- /dev/null +++ b/client/pom.xml @@ -0,0 +1,101 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + + 2.0.2.RELEASE + + + cn.algerfan + client + 0.0.1-SNAPSHOT + client + Demo project for Spring Boot + + + 1.8 + + Finchley.RELEASE + + + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + + org.springframework.boot + spring-boot-starter-web + + + + 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/client/src/main/java/cn/algerfan/client/ClientApplication.java b/client/src/main/java/cn/algerfan/client/ClientApplication.java new file mode 100755 index 0000000..f89f4c7 --- /dev/null +++ b/client/src/main/java/cn/algerfan/client/ClientApplication.java @@ -0,0 +1,18 @@ +package cn.algerfan.client; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; + +/** + * @author algerfan + */ +@SpringBootApplication +@EnableDiscoveryClient +public class ClientApplication { + + public static void main(String[] args) { + SpringApplication.run(ClientApplication.class, args); + } + +} diff --git a/client/src/main/resources/application.yml b/client/src/main/resources/application.yml new file mode 100755 index 0000000..de8a5c0 --- /dev/null +++ b/client/src/main/resources/application.yml @@ -0,0 +1,9 @@ +eureka: + client: + service-url: + defaultZone: http://localhost:8761/eureka/ + instance: + prefer-ip-address: true +spring: + application: + name: client diff --git a/client/src/test/java/cn/algerfan/client/ClientApplicationTests.java b/client/src/test/java/cn/algerfan/client/ClientApplicationTests.java new file mode 100755 index 0000000..0c79d8e --- /dev/null +++ b/client/src/test/java/cn/algerfan/client/ClientApplicationTests.java @@ -0,0 +1,16 @@ +package cn.algerfan.client; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ClientApplicationTests { + + @Test + public void contextLoads() { + } + +}