diff --git a/spring-boot-demo-admin-server/.gitignore b/spring-boot-demo-admin-server/.gitignore
new file mode 100644
index 0000000..82eca33
--- /dev/null
+++ b/spring-boot-demo-admin-server/.gitignore
@@ -0,0 +1,25 @@
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/build/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
\ No newline at end of file
diff --git a/spring-boot-demo-admin-server/README.md b/spring-boot-demo-admin-server/README.md
new file mode 100644
index 0000000..1fe464c
--- /dev/null
+++ b/spring-boot-demo-admin-server/README.md
@@ -0,0 +1,115 @@
+# spring-boot-demo-admin-server
+
+> 本 demo 主要演示了如何搭建一个 Spring Boot Admin 的服务端项目,可视化展示自己客户端项目的运行状态。
+
+## pom.xml
+
+```xml
+
+
+ * 启动类 + *
+ * + * @package: com.xkcoding.admin.server + * @description: 启动类 + * @author: yangkai.shen + * @date: Created in 2018/10/8 2:08 PM + * @copyright: Copyright (c) 2018 + * @version: V1.0 + * @modified: yangkai.shen + */ +@EnableAdminServer +@SpringBootApplication +public class SpringBootDemoAdminServerApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringBootDemoAdminServerApplication.class, args); + } +} +``` + +## application.yml + +```yaml +server: + port: 8000 +spring: + boot: + admin: + # 管控台上下文路径 + context-path: /admin +``` + diff --git a/spring-boot-demo-admin-server/pom.xml b/spring-boot-demo-admin-server/pom.xml new file mode 100644 index 0000000..fde587f --- /dev/null +++ b/spring-boot-demo-admin-server/pom.xml @@ -0,0 +1,68 @@ + ++ * 启动类 + *
+ * + * @package: com.xkcoding.admin.server + * @description: 启动类 + * @author: yangkai.shen + * @date: Created in 2018/10/8 2:08 PM + * @copyright: Copyright (c) 2018 + * @version: V1.0 + * @modified: yangkai.shen + */ +@EnableAdminServer +@SpringBootApplication +public class SpringBootDemoAdminServerApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringBootDemoAdminServerApplication.class, args); + } +} diff --git a/spring-boot-demo-admin-server/src/main/resources/application.yml b/spring-boot-demo-admin-server/src/main/resources/application.yml new file mode 100644 index 0000000..93195d1 --- /dev/null +++ b/spring-boot-demo-admin-server/src/main/resources/application.yml @@ -0,0 +1,7 @@ +server: + port: 8000 +spring: + boot: + admin: + # 管控台上下文路径 + context-path: /admin \ No newline at end of file diff --git a/spring-boot-demo-admin-server/src/test/java/com/xkcoding/admin/server/SpringBootDemoAdminServerApplicationTests.java b/spring-boot-demo-admin-server/src/test/java/com/xkcoding/admin/server/SpringBootDemoAdminServerApplicationTests.java new file mode 100644 index 0000000..b3df7ee --- /dev/null +++ b/spring-boot-demo-admin-server/src/test/java/com/xkcoding/admin/server/SpringBootDemoAdminServerApplicationTests.java @@ -0,0 +1,16 @@ +package com.xkcoding.admin.server; + +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 SpringBootDemoAdminServerApplicationTests { + + @Test + public void contextLoads() { + } + +}