zoukankan      html  css  js  c++  java
  • 谷粒商城nacos远程配置中心出错

    首先检查配置文件是否正确创建

    image-20210514122028253

    application.yml ,application.properties 最好不要有中文,有中文注释也不行。

    yml文件格式容易出错。 确定其他没有错之后,最后解决方法 删除重新建立一个

    nacos中心配置文件建立要正确

    image-20210514122527067

    如果还是报错,检查你的springcloud版本和springboot版本

    coupon模块中引入的依赖

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Greenwich.SR3</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    

    在common中是否引入了对应的依赖

    <!--        nacos的配置中心-->
            <dependency>
                <groupId>com.alibaba.cloud</groupId>
                <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
            </dependency>
    
        <dependencyManagement>
            <dependencies>
    <!--            springcloud版本依赖-->
                <dependency>
                    <groupId>com.alibaba.cloud</groupId>
                    <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                    <version>2.1.0.RELEASE</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
            </dependencies>
        </dependencyManagement>
    
    努力学习java的Cherish
  • 相关阅读:
    rails 给类添加属性
    workflow engine Ruote初体验之二(通用属性)
    workflow engine Ruote初体验之一(概念)
    workflow engine Ruote 安装
    文字编码
    C# 制作Windows服务安装包
    Ruby on rails初体验(三)
    18-语言入门-18-鸡兔同笼
    17-语言入门-17-笨小熊
    16-语言入门-16-谁获得了最高奖学金
  • 原文地址:https://www.cnblogs.com/cherish-code/p/14768098.html
Copyright © 2011-2022 走看看