spring-cloud / spring-cloud-bus

Spring Cloud event bus
http://cloud.spring.io/spring-cloud-bus/
Apache License 2.0
409 stars 242 forks source link

405 method not allowed for /actuator/bus-refresh #216

Closed deepakThedeveloper closed 4 years ago

deepakThedeveloper commented 4 years ago

I am trying to execute POST request on /actuator/bus-refresh url of spring-cloud and I am getting 405 as response status code with error message as Method Not Allowed.

Below is my application.properties file of config server spring.application.name = config-server-service server.port = 8012

spring.cloud.config.server.git.uri = spring.cloud.config.server.git.username = spring.cloud.config.server.git.password = *** spring.cloud.config.server.git.clone-on-startup = true

management.endpoints.web.exposure.include = bus-refresh

spring.rabbitmq.host = localhost spring.rabbitmq.port = 5672 spring.rabbitmq.username = guest spring.rabbitmq.password = guest

Below dependencies are added in pom.xml of config server

org.springframework.boot spring-boot-starter-actuator org.springframework.boot spring-boot-starter-amqp

Spring-boot-version that I am using is 2.2.4.RELEASE

image

spencergibb commented 4 years ago

What version? Are you trying to post a body?

deepakThedeveloper commented 4 years ago

spring cloud version? its 2.2.1 and actuator version is 2.2.4. Spring boot version is 2.2.4. Nope I am not trying to post any body. I am just giving a post call to url http://localhost:8012/actuator/bus-refresh

deepakThedeveloper commented 4 years ago

Hello Sir, can you please provide any solution for this?

sabahallah commented 4 years ago

Hi,

This is the same issue happened to me. I posted a question on stackoverflow here.

Please help if there's something wrong or any resolution.

Dependencies:

spring-cloud-config-server spring-cloud-starter-bus-amqp spring-boot-starter-actuator

Versions: Boot: 2.2.5.RELEASE Cloud: Hoxton.SR3

spencergibb commented 4 years ago

/bus-refresh does not support post.

asheCarry commented 3 years ago

@spencergibb /bus-refresh does not support post. I can not beleive it.

ChristinaDawoud commented 3 years ago

I used the following dependency :

org.springframework.cloud spring-cloud-starter-bus-amqp instead of this : org.springframework.boot spring-boot-starter-amqp