瀏覽代碼

代码重构

chenweida 7 年之前
父節點
當前提交
9f9653eeba

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

@ -36,7 +36,8 @@
        <!--业务微服务-->
        <!--业务微服务-->
        <module>../svr/svr-base</module><!--基础微服务-->
        <module>../svr/svr-base</module><!--基础微服务-->
        <module>../svr/svr-wlyy</module><!--i健康微服务-->
        <module>../svr/svr-wlyy</module><!--i健康微服务-->
        <module>../svr/svr-manage</module><!--基卫后台管理系统-->
        <module>../svr/svr-manage</module><!--后台管理系统-->
        <module>../svr/svr-iot</module><!--物联网平台-->
        <!--网关-->
        <!--网关-->
        <module>../web-gateway</module><!--web网关-->
        <module>../web-gateway</module><!--web网关-->

+ 34 - 0
svr/svr-iot/pom.xml

@ -0,0 +1,34 @@
<?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>
    <artifactId>svr-iot</artifactId>
    <version>1.0.0</version>
    <dependencies>
        <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>com.yihu.base</groupId>
            <artifactId>common-data-mysql</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.base</groupId>
            <artifactId>common-quartz</artifactId>
        </dependency>
    </dependencies>
</project>

+ 1 - 0
svr/svr-iot/readme.MD

@ -0,0 +1 @@
Internet of things  物联网平台

+ 7 - 0
svr/svr-iot/src/main/java/com/yihu/iot/IOTApplication.java

@ -0,0 +1,7 @@
package com.yihu.iot;
/**
 * Created by chenweida on 2017/11/27.
 */
public class IOTApplication {
}

+ 21 - 0
svr/svr-iot/src/main/resources/application.yml

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

+ 8 - 0
svr/svr-iot/src/main/resources/banner.txt

@ -0,0 +1,8 @@
  /$$$$$$        /$$    /$$       /$$$$$$$                      /$$$$$$        /$$$$$$        /$$$$$$$$
 /$$__  $$      | $$   | $$      | $$__  $$                    |_  $$_/       /$$__  $$      |__  $$__/
| $$  \__/      | $$   | $$      | $$  \ $$                      | $$        | $$  \ $$         | $$
|  $$$$$$       |  $$ / $$/      | $$$$$$$/       /$$$$$$        | $$        | $$  | $$         | $$
 \____  $$       \  $$ $$/       | $$__  $$      |______/        | $$        | $$  | $$         | $$
 /$$  \ $$        \  $$$/        | $$  \ $$                      | $$        | $$  | $$         | $$
|  $$$$$$/         \  $/         | $$  | $$                     /$$$$$$      |  $$$$$$/         | $$
 \______/           \_/          |__/  |__/                    |______/       \______/          |__/

+ 46 - 0
svr/svr-iot/src/main/resources/bootstrap.yml

@ -0,0 +1,46 @@
##优先读取 boostarap配置 然后在读取application。yml的配置
spring:
  #从发现服务里面取配置服务的信息
  cloud:
    config:
      failFast: true ##启动快速失败 即链接不到配置服务就启动失败
      username: jw
      password: jkzl
      discovery:
        enabled: true ##使用发现服务
        service-id: svr-configurations ##配置服务的名字
---
spring:
  profiles: jwdev
##发现服务的地址
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/
---
spring:
  profiles: jwtest
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://jw:jkzl@172.19.103.33:8761/eureka/
---
spring:
  profiles: jwprod
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/