Browse Source

新增统计项目

chenweida 8 years ago
parent
commit
016b70561a

+ 1 - 1
readme.MD

@ -4,7 +4,7 @@
        涉及主要技术 swagger
     svr    业务微服务  
        svr-user 用户微服务
        涉及主要技术 euruka   
        svr-quota 统计微服务
     svr-configuration    配置服务 
        涉及主要技术 git(存储配置文件) 
     svr-discovery    发现服务 

+ 1 - 0
svr-lib-parent-pom/pom.xml

@ -27,6 +27,7 @@
        <!--业务微服务-->
        <module>../svr/svr-base</module><!--基础微服务-->
        <module>../svr/svr-quota</module><!--统计微服务-->
        <!--网关-->

+ 3 - 1
svr/readme.MD

@ -1,2 +1,4 @@
svr 相关的db设计
    svn:https://192.168.1.103:888/svn/outwindow/基础开发部/doc/i健康2.0/db
    svn:https://192.168.1.103:888/svn/outwindow/基础开发部/doc/i健康2.0/db
    svr-base 基础扩展服务,部分基础服务用ehr的
    svr-quota 统计相关服务

+ 0 - 1
svr/svr-base/pom.xml

@ -17,7 +17,6 @@
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-swagger</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>

+ 60 - 0
svr/svr-quota/pom.xml

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>
    <groupId>com.yihu.jw</groupId>
    <artifactId>svr-quota</artifactId>
    <version>1.0.0</version>
    <dependencies>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-swagger</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
    </dependencies>
</project>

+ 17 - 0
svr/svr-quota/src/main/java/com/yihu/jw/SvrQuotaApplication.java

@ -0,0 +1,17 @@
package com.yihu.jw;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
 * Created by chenweida on 2017/5/16.
 */
@SpringBootApplication
@EnableDiscoveryClient//服务注册到发现服务
public class SvrQuotaApplication {
    public static void main(String[] args) {
        SpringApplication.run(SvrQuotaApplication.class, args);
    }
}

+ 19 - 0
svr/svr-quota/src/main/resources/application.yml

@ -0,0 +1,19 @@
##如果有配置服务的话,远程服务器和本地服务器配置不一致的情况下,优先远程的为主  git上 svr-base ->  git application ->本地 appliction ->本地 bootstarp
spring:
  application:
    name:  svr-quota  ##注册到发现服务的id 如果id一样 eurika会自动做负载
---
spring:
  profiles: dev
---
spring:
  profiles: test
---
spring:
  profiles: prod

+ 6 - 0
svr/svr-quota/src/main/resources/banner.txt

@ -0,0 +1,6 @@
 _____               ____              _
  / ____|             / __ \            | |
 | (_____   ___ __   | |  | |_   _  ___ | |_ __ _
  \___ \ \ / / '__|  | |  | | | | |/ _ \| __/ _` |
  ____) \ V /| |     | |__| | |_| | (_) | || (_| |
 |_____/ \_/ |_|      \___\_\\__,_|\___/ \__\__,_|

+ 45 - 0
svr/svr-quota/src/main/resources/bootstrap.yml

@ -0,0 +1,45 @@
##优先读取 boostarap配置 然后在读取application。yml的配置
spring:
  #从发现服务里面取配置服务的信息
  cloud:
    config:
      username: jw
      password: jkzl
      discovery:
        enabled: true ##使用发现服务
        service-id: svr-configurations ##配置服务的名字
---
spring:
  profiles: dev
##发现服务的地址
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/
---
spring:
  profiles: test
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/
---
spring:
  profiles: prod
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/