zoukankan      html  css  js  c++  java
  • SpringCloud学习第三章-springcloud 父项目创建

    父项目 pom.xml

    <?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>
    
        <groupId>org.hxm</groupId>
        <artifactId>spring-cloud</artifactId>
        <packaging>pom</packaging>
        <version>1.0-SNAPSHOT</version>
        <modules>
            <module>spring-eureka</module>
            <module>order-Server</module>
            <module>ribbon-server</module>
            <module>fegin-client</module>
            <module>fegin-client</module>
        </modules>
    
        <name>spring-cloud</name>
    
    
        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.0.3.RELEASE</version>
            <relativePath/>
        </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.RELEASE</spring-cloud.version>
        </properties>
    
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <scope>test</scope>
            </dependency>
        </dependencies>
    
        <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>
            </dependencies>
        </dependencyManagement>
    
        <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </build>
    
    
    
    </project>

    注意:spring boot的版本和Springcluod版本需要对应,否则会出现错误,否则会出现

    1. java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V 这个错误
    SpringCloud SpringBoot
    Finchley 兼容Spring Boot 2.0.x,不兼容Spring Boot 1.5.x
    Dalston和Edgware 兼容Spring Boot 1.5.x,不兼容Spring Boot 2.0.x
    Camden 兼容Spring Boot 1.4.x,也兼容Spring Boot 1.5.x
    Brixton 兼容Spring Boot 1.3.x,也兼容Spring Boot 1.4.x
    Angel 兼容Spring Boot 1.2.x
  • 相关阅读:
    纸上谈兵:最短路径与贪婪算法
    “不给力啊,老湿!”:RSA加密与破解
    纸上谈兵:拓扑排序
    Homebrew 安装使用
    Servlet详解
    搭建SpringMVC
    设置IDEA智能感知支持Jsp内置对象
    素材网站
    常用单词
    常见异常
  • 原文地址:https://www.cnblogs.com/JavaHxm/p/11408432.html
Copyright © 2011-2022 走看看