美文网首页
springcloud(一)模块定义

springcloud(一)模块定义

作者: DimonHo | 来源:发表于2018-10-18 15:08 被阅读193次

先说下我的springcloud整个生态中包含哪些服务模块:

  • 公共jar包:
  1. commons(公共类)
  2. api-feign(feign接口定义包)
  • 基础服务模块:
  1. euraka-server(服务注册中心)
  2. config-server(配置中心)
  3. api-gateway(zuul网关)
  4. monitoring(服务监控)
  5. zipkin-server(服务链路追踪服务)
  • 业务服务模块
  1. resources-server(资源文件服务,提供文件上传和下载接口,文件统一保存至hbase)
  2. user-server(用户管理模块)
  • pom.xml(该文件是各个模块的父pom.xml定义,统一管理jar包版本 )
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         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>

    <groupId>com.dh.cloud</groupId>
    <artifactId>api-root</artifactId>
    <version>0.0.2-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>api-root</name>
    <description>微服务根POM</description>

    <modules>
        <module>commons</module><!--公共类-->
        <module>api-feign</module><!--feign接口-->
        <module>config-server</module><!--配置中心服务-->
        <module>eureka-server</module><!--服务注册中心-->
        <module>zipkin-server</module><!--链路追踪服务-->
        <module>api-gateway</module><!--api网关-->
        <module>monitoring</module><!-- 监控模块 -->
        <module>user-server</module><!--用户管理服务-->
        <module>resources-server</module><!--  文件(图片)资源服务 -->
    </modules>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <spring-cloud.version>Finchley.RC2</spring-cloud.version>
        <feign.version>1.4.5.RELEASE</feign.version>
        <com.alibaba.druid.version>1.1.9</com.alibaba.druid.version>
        <javax.mail.version>1.4.7</javax.mail.version>
        <swagger.version>1.8.0.RELEASE</swagger.version>
        <cn.hutool.all.version>4.1.8</cn.hutool.all.version>
        <guava.version>23.0</guava.version>
        <jackson.databind.version>2.9.5</jackson.databind.version>
        <jackson.core.version>2.9.5</jackson.core.version>
        <jackson.asl.version>1.9.12</jackson.asl.version>
        <log4j-api.version>2.9.1</log4j-api.version>
        <log4j-core.version>2.9.1</log4j-core.version>
        <spring-boot-admin.version>2.0.1</spring-boot-admin.version>
        <jolokia.version>1.5.0</jolokia.version>
        <spring.data.elastic>3.0.9.RELEASE</spring.data.elastic>
        <hbase.client.version>1.1.2</hbase.client.version>
        <spring.data.hadoop.version>2.5.0.RELEASE</spring.data.hadoop.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-feign</artifactId>
                <version>${feign.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-elasticsearch</artifactId>
                <version>${spring.data.elasticsearch.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-hadoop</artifactId>
                <version>${spring.data.hadoop.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.hbase</groupId>
                <artifactId>hbase-client</artifactId>
                <version>${hbase.client.version}</version>
            </dependency>

            <dependency>
                <groupId>de.codecentric</groupId>
                <artifactId>spring-boot-admin-starter-server</artifactId>
                <version>${spring-boot-admin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jolokia</groupId>
                <artifactId>jolokia-core</artifactId>
                <version>${jolokia.version}</version>
            </dependency>
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>druid</artifactId>
                <version>${com.alibaba.druid.version}</version>
            </dependency>
            <dependency>
                <groupId>com.spring4all</groupId>
                <artifactId>swagger-spring-boot-starter</artifactId>
                <version>${swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.mail</groupId>
                <artifactId>mail</artifactId>
                <version>${javax.mail.version}</version>
            </dependency>

            <dependency>
                <groupId>com.dh.cloud</groupId>
                <artifactId>commons</artifactId>
                <version>${version}</version>
            </dependency>
            <dependency>
                <groupId>com.dh.cloud</groupId>
                <artifactId>api-feign</artifactId>
                <version>${version}</version>
            </dependency>
            <dependency>
                <groupId>cn.hutool</groupId>
                <artifactId>hutool-all</artifactId>
                <version>${cn.hutool.all.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.databind.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${jackson.core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-mapper-asl</artifactId>
                <version>${jackson.asl.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <distributionManagement>
        <!-- 两个ID必须与 setting.xml中的<server><id>nexus-rs</id></server>保持一致-->
        <repository>
            <id>nexus-releases</id>
            <name>Nexus Release Repository</name>
            <url>http://192.168.1.2:8081/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>nexus-snapshots</id>
            <name>Nexus Snapshot Repository</name>
            <url>http://192.168.1.2:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
</project>

相关文章

网友评论

      本文标题:springcloud(一)模块定义

      本文链接:https://www.haomeiwen.com/subject/eaxszftx.html