在用Spring Cloud Bus、kafka实现config-server自动刷新配置的时候,执行命令:
curl -X post http://localhost:8881/bus/refresh报如下错误:
{"timestamp":1513070184793,"status":405,"error":"Method Not Allowed","exception":"org.springframework.web.HttpRequestMethodNotSupportedException","message":"Request method 'post' not supported","path":"/bus/refresh"}campus-080-239最后发现了一个很低级的错误,就是把post小写了,应该改成大写:
curl -X POST http://localhost:8881/bus/refresh更多系列文章推荐:
Spring Cloud (20) | Spring Cloud Bus 使用kafka消息总线、gitlab添加webhooks实现自动刷新配置Spring Cloud (19) | Eureka Server 高可用服务注册中心Spring Cloud (18) | 给Eureka Server加上安全验证Spring Cloud (15) | Spring Boot、HikariCP、Mybatis和MySQL 配置HikariCP数据库连接池Spring Cloud (14) | 微服务不能从git/github/gitlab中获取数据库信息 can’t load properties from git/github/gitlabSpring Cloud (12) | Spring Cloud Zuul网关调用微服务,request请求参数是application/jsonSpring Cloud (11) | healthcheck开启健康检查Spring Cloud (10) | Eureka 各项参数详解Spring Cloud (8) | 把Spring Boot项目改造成tomcat容器启动Spring Cloud (7) | Mongodb 微服务Spring Cloud (6) | spring cloud zuul 跨域问题No ‘Access-Control-Allow-Origin’ headerSpring Cloud (5) | 配置中心 Config Server 配置git or github or gitlabSpring Cloud (3) | spring cloud bus 消息总线kafka应用Spring Cloud (1) | java.net.UnknownHostException: eureka-server