Java Code Examples for org.springframework.web.filter.reactive.HiddenHttpMethodFilter

The following examples show how to use org.springframework.web.filter.reactive.HiddenHttpMethodFilter. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Bean
public HiddenHttpMethodFilter hiddenHttpMethodFilter() {
    return new HiddenHttpMethodFilter() {
        @Override
        public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
            return chain.filter(exchange);
        }
    };
}
 
Example 2
Source Project: soul   Source File: ErrorHandlerConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * https://github.com/spring-cloud/spring-cloud-gateway/issues/541
 * Hidden http method filter hidden http method filter.
 *
 * @return the hidden http method filter
 */
@Bean
public HiddenHttpMethodFilter hiddenHttpMethodFilter() {
    return new HiddenHttpMethodFilter() {
        @Override
        public Mono<Void> filter(final ServerWebExchange exchange, final WebFilterChain chain) {
            return chain.filter(exchange);
        }
    };
}
 
Example 3
@Test
public void noHiddenHttpMethodFilter() {
	try (ConfigurableApplicationContext ctx = SpringApplication.run(Config.class,
			"--spring.jmx.enabled=false", "--server.port=0")) {
		assertThat(ctx.getEnvironment()
				.getProperty("spring.webflux.hiddenmethod.filter.enabled"))
						.isEqualTo("false");
		assertThat(ctx.getBeanNamesForType(HiddenHttpMethodFilter.class)).isEmpty();
	}
}
 
Example 4
Source Project: tutorials   Source File: SpringWebfluxAmqpApplication.java    License: MIT License 5 votes vote down vote up
/**
 * 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);
        }
    };
}
 
Example 5
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 6
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 7
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 8
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 9
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 10
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 11
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 12
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 13
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 14
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 15
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 16
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 17
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 18
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 19
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 20
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 21
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 22
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 23
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example 24
Source Project: spring-5-examples   Source File: WebappApplication.java    License: MIT License 4 votes vote down vote up
@Bean
@Order(Ordered.HIGHEST_PRECEDENCE)
public HiddenHttpMethodFilter hiddenHttpMethodFilter() {
  return new HiddenHttpMethodFilter();
}