1. springcloud1.5.x的消息总线配置是

# RabbitMq的地址、端口,用户名、密码
spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest
# 保证调用 /bus/refresh的时候不需要验证
management.security.enabled=false

configServer的启动类加上注解@RefreshScope

configClient的启动类也加上注解@RefreshScope

修改github上的配置文件之后,打开postman,请求方式是post,地址是http://localhost:8881/bus/refresh,这个端口号是configServer的。

请求成功之后,返回的是空白,此时configClient就能获取到最新的配置信息。

2.  springcloud2.x的消息总线配置是

# RabbitMq的地址、端口,用户名、密码
spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest # 刷新配置,在spring boot 2.x 之前1.x的management.security.enabled失效,新的配置为
management.endpoints.web.exposure.include=bus-refresh

configServer的启动类加上注解@RefreshScope

configClient的启动类也加上注解@RefreshScope

修改github上的配置文件之后,打开postman,请求方式是post,地址是http://localhost:8881/actuator/bus-refresh,这个端口号是configServer的。

请求成功之后,返回的是空白,此时configClient就能获取到最新的配置信息。

3. 需要注意的是configClient也要配置RabbiMq。

springcloud2.x之management.security.enabled=false报错处理的更多相关文章

  1. Spring Boot 2.x中的management.security.enabled=false无效问题

    look: https://blog.csdn.net/qq_27385301/article/details/82899303

  2. springboot2.0 management.security.enabled无效

    在1.5.x版本中通过management.security.enabled=false来暴露所有端点 在使用springcloud的时候,如果基于springboot2的版本的配置中心,无法使用SV ...

  3. 状态栏 a.getBoolean(1, false) 报错

    状态栏 a.getBoolean(1, false) 报错 这个错误在编译运行时候并不会出现,但是当需要编译打包的时候,就会报出这个异常. TypedArray a = mContext.obtain ...

  4. bug日志-天坑,Spring Security的登陆报错:An internal error occurred while trying to authenticate the user.

    在学习Spring Security的时候,我的编辑器给我报错:An internal error occurred while trying to authenticate the user. 明明 ...

  5. onsubmit="return false;"报错

    <form id="formpersonal" method="post" onsubmit="return false;">. ...

  6. These relative modules were not found:...{"sourceM ap":false} 报错解决

    今天在使用vue2.0 + webpack 时,没有动过任何配置文件,也没更新依赖,但是报下面的错误: These relative modules were not found: * ./star1 ...

  7. AndroidManifest设置android:allowBackup="false"报错

    概述 设置android:allowBackup="false"的必要性 Android API Level 8及其以上Android系统提供了为应用程序数据的备份和恢复功能,此功 ...

  8. 解决 MyEclipse 10 中 JSp页面 “return false” 报错问题

    1.MyEclipse ->. Preferences 2.validation ->>找到JavaScript validator for Js files  builder 下面 ...

  9. spring cloud-config的client中/refresh的端点报错401

    post访问/refresh端口报错如下 { "timestamp": 1537865395040, "status": 401, "error&qu ...

随机推荐

  1. 明解C语言 中级篇 第四章答案

    练习4-1 /* 珠玑妙算 */ #include <time.h> #include <ctype.h> #include <stdio.h> #include ...

  2. SiftingAppender logback 动态 输出 日志 到指定日志文件

    SiftingAppender https://www.mkyong.com/logging/logback-different-log-file-for-each-thread/

  3. JVM内存溢出分析java.lang.OutOfMemoryError: Java heap space

    JVM内存溢出查询java.lang.OutOfMemoryError: Java heap space查出具体原因分为几个预备步骤 1.在运行java程序是必须设置jvm -XX:+HeapDump ...

  4. linux中查找包含指定内容的文件

    Linux查找文件内容的常用方法 ##文件名+内容 grep -r "查询内容" 文件目录 ##只显示包含内容的文件名 grep -r -l "查询内容" 文件 ...

  5. c# 调用接口返回json

    需要命名空间 using System.Net; using System.Net.Security using System.Security.Cryptography.X509Certificat ...

  6. 前端开发JS——数组

    25.数组 1)声明数组: ①构造函数创建数组 var arr = new Array(); console.log(arr):        //[]   var arr = new Array(2 ...

  7. delphi消息发送字符串

    delphi消息发送字符串 其实不论什么方法,归根揭底都是通过传递对象的指针来达到效果的. 方法一: procedure SendString(strMSG: string);var  Data: t ...

  8. Python3字典排序

    创建一个字典 dict1={'a':2,'b':3,'c':8,'d':4} 1.分别取键.值 取字典的所有键,所有的值,利用dict1.keys(),dict1.vaules(), 由于键,值有很多 ...

  9. SpringMVC结果参数转换XSS攻击安全处理

    首先在sprigMvc的配置文件中配置返回结果集使用的类 <!-- 参数转码 --> <mvc:annotation-driven> <!-- 注册处理 JSON 的转换 ...

  10. RabbitMQ的几个常见问题

    1. 如何保证消息尽量发送成功? 问题描述: 如果没有启动消费者,重启了RabbitMQ服务,队列和消息都会丢失. 解决方案: 针对这个问题,有以下几个机制可以解决: 生产者确认: 持久化: 手动AC ...