zoukankan      html  css  js  c++  java
  • 2.1 SpringCloud__父项目建立

    SpringCloud__父项目建立

    我们开发项目,现在基本都用到maven,以及用父子项目,以及公共模块依赖,来构建方便扩展的项目体系;

     

    首先我们建立父项目 microservice ,主要是一个pom,管理module,以及管理依赖,规范所有jar包版本等;

     

    详细步骤 请看 一头扎进springcloud 课程

     

    新建maven项目

    1.jpg

     

    勾选 create a simple project

    2.jpg

     

    填写groud ip   , artifact Id ,  Packaging 指定成pom 

    3.jpg

     

    我们Springcloud版本 用 Edgware.SR4

    Springboot版本 用 1.5.13.RELEASE

     

    修改pom.xml

    <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>
      <groupId>com.java1234.springcloud</groupId>
      <artifactId>microservice</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <packaging>pom</packaging>
       
      <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <maven.compiler.source>1.8</maven.compiler.source>
            <maven.compiler.target>1.8</maven.compiler.target>
            <druid.version>1.1.10</druid.version>
      </properties>
       
      <dependencyManagement>
          <dependencies>
              <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Edgware.SR4</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>1.5.13.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- 连接池 -->
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>druid</artifactId>
                <version>${druid.version}</version>
            </dependency>
          </dependencies>
      </dependencyManagement>
    </project>

    这里引入了 springcloud 以及springboot  包括 druid连接池  以及 属性 规范编译 目标版本,包括连接池版本 编码等信息;

  • 相关阅读:
    【转载】RNA-seq测序方法
    NeuN神经元核抗原
    单细胞测序
    安装cytoscape时的折腾
    linux文件目录
    结合自己做过的数据,对cosmic signature理解
    减数分裂meiosis-有丝分裂miosis-染色体-DNA-等位基因
    AD发生了什么
    FDR的含义
    置换检验—结合GSEA解释
  • 原文地址:https://www.cnblogs.com/cbpm-wuhq/p/15382987.html
Copyright © 2011-2022 走看看