Workaround for spring-framework#21094
This commit is contained in:
parent
29d9159ebf
commit
a86c69429b
@ -16,6 +16,20 @@
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<!-- Import dependency management from Spring Boot -->
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<!-- <version>2.0.4.RELEASE</version> --><!-- works -->
|
||||
<version>2.1.3.RELEASE</version> <!-- Works with workaround applied -->
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -3,6 +3,12 @@ package org.baeldung.spring.amqp;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.web.filter.reactive.HiddenHttpMethodFilter;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import org.springframework.web.server.WebFilterChain;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableConfigurationProperties(DestinationsConfig.class)
|
||||
@ -12,4 +18,19 @@ public class SpringWebfluxAmqpApplication {
|
||||
SpringApplication.run(SpringWebfluxAmqpApplication.class, args);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is a workaround for https://github.com/spring-projects/spring-framework/issues/21094
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public HiddenHttpMethodFilter hiddenHttpMethodFilter() {
|
||||
return new HiddenHttpMethodFilter() {
|
||||
@Override
|
||||
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
spring:
|
||||
rabbitmq:
|
||||
host: localhost
|
||||
host: 192.168.99.100
|
||||
port: 5672
|
||||
username: guest
|
||||
password: guest
|
||||
|
Loading…
x
Reference in New Issue
Block a user