diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a0e9c24 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2017 李守余 + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/config-server/README.md b/config-server/README.md new file mode 100644 index 0000000..8b24f32 --- /dev/null +++ b/config-server/README.md @@ -0,0 +1 @@ +###配置服务中心 diff --git a/config-server/pom.xml b/config-server/pom.xml index 4884a2b..a785ed1 100644 --- a/config-server/pom.xml +++ b/config-server/pom.xml @@ -34,6 +34,16 @@ spring-cloud-config-server + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-actuator + + org.springframework.boot spring-boot-starter-test diff --git a/config-server/src/main/resources/application.yml b/config-server/src/main/resources/application.yml index 12800af..3c26aae 100644 --- a/config-server/src/main/resources/application.yml +++ b/config-server/src/main/resources/application.yml @@ -7,4 +7,19 @@ spring: git: uri: https://git.oschina.net/kklt1996/config-server/ server: - port: 10001 \ No newline at end of file + port: 10001 +# 健康检查的相关配置 +management: + health: + mail: + enabled: false + redis: + enabled: false + port: 20001 + # info 信息的获取 +info: + app: + profiles: dev + name: "@project.name@" #从pom.xml中获取 + description: "@project.description@" + version: "@project.version@" diff --git a/eureka-server/README.md b/eureka-server/README.md new file mode 100644 index 0000000..03ce772 --- /dev/null +++ b/eureka-server/README.md @@ -0,0 +1 @@ +###注册中心 diff --git a/eureka-server/pom.xml b/eureka-server/pom.xml index 9901ce6..551ea9d 100644 --- a/eureka-server/pom.xml +++ b/eureka-server/pom.xml @@ -1,73 +1,78 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - com.micro.fast.eureka.server - eureka-server - 0.0.1-SNAPSHOT - jar + com.micro.fast.eureka.server + eureka-server + 0.0.1-SNAPSHOT + jar - eureka-server - eureka-server + eureka-server + eureka-server - - org.springframework.boot - spring-boot-starter-parent - 1.5.4.RELEASE - - + + org.springframework.boot + spring-boot-starter-parent + 1.5.4.RELEASE + + - - UTF-8 - UTF-8 - 1.8 - Dalston.SR1 - 1.8 - 1.8 - 1.8 - + + UTF-8 + UTF-8 + 1.8 + Dalston.SR1 + 1.8 + 1.8 + 1.8 + - - - org.springframework.cloud - spring-cloud-starter-config - - - org.springframework.cloud - spring-cloud-starter-eureka-server - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-test - test - - + + + org.springframework.cloud + spring-cloud-starter-config + - - - - org.springframework.cloud - spring-cloud-dependencies - ${spring-cloud.version} - pom - import - - - + + org.springframework.cloud + spring-cloud-starter-eureka-server + - - - - org.springframework.boot - spring-boot-maven-plugin - - - + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-actuator + + + 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/upms/.gitignore b/upms/.gitignore new file mode 100644 index 0000000..8c1680a --- /dev/null +++ b/upms/.gitignore @@ -0,0 +1,31 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +nbproject/private/ +build/ +nbbuild/ +dist/ +nbdist/ +.nb-gradle/ + +### maven ### +target +out +.mvn +mvnw +mvnw.cmd diff --git a/upms/README.md b/upms/README.md new file mode 100644 index 0000000..faff7e5 --- /dev/null +++ b/upms/README.md @@ -0,0 +1 @@ +###用户权限管理系统 diff --git a/upms/pom.xml b/upms/pom.xml new file mode 100644 index 0000000..cda18ba --- /dev/null +++ b/upms/pom.xml @@ -0,0 +1,90 @@ + + + 4.0.0 + + com.micro.fast.upms + upms + 0.0.1-SNAPSHOT + jar + + upms + upms + + + org.springframework.boot + spring-boot-starter-parent + 1.5.4.RELEASE + + + + + UTF-8 + UTF-8 + 1.8 + Dalston.SR1 + 1.8 + 1.8 + 1.8 + + + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.cloud + spring-cloud-starter-config + + + org.springframework.cloud + spring-cloud-starter-eureka + + + org.springframework.cloud + spring-cloud-starter-feign + + + org.springframework.cloud + spring-cloud-starter-hystrix + + + org.springframework.cloud + spring-cloud-starter-ribbon + + + 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/upms/src/main/java/com/micro/fast/upms/UpmsApplication.java b/upms/src/main/java/com/micro/fast/upms/UpmsApplication.java new file mode 100644 index 0000000..4dbea1b --- /dev/null +++ b/upms/src/main/java/com/micro/fast/upms/UpmsApplication.java @@ -0,0 +1,14 @@ +package com.micro.fast.upms; + +import org.springframework.boot.SpringApplication; +import org.springframework.cloud.client.SpringCloudApplication; +import org.springframework.cloud.netflix.feign.EnableFeignClients; + +@SpringCloudApplication +@EnableFeignClients +public class UpmsApplication { + + public static void main(String[] args) { + SpringApplication.run(UpmsApplication.class, args); + } +} diff --git a/upms/src/main/resources/bootstrap.yml b/upms/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..7570045 --- /dev/null +++ b/upms/src/main/resources/bootstrap.yml @@ -0,0 +1,8 @@ +# 从配置中心加载文件 +spring: + cloud: + config: + uri: http://localhost:10001/ + profile: dev + label: master + name: upms \ No newline at end of file diff --git a/upms/src/test/java/com/micro/fast/upms/UpmsApplicationTests.java b/upms/src/test/java/com/micro/fast/upms/UpmsApplicationTests.java new file mode 100644 index 0000000..aae6340 --- /dev/null +++ b/upms/src/test/java/com/micro/fast/upms/UpmsApplicationTests.java @@ -0,0 +1,16 @@ +package com.micro.fast.upms; + +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 UpmsApplicationTests { + + @Test + public void contextLoads() { + } + +}