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

The following examples show how to use org.springframework.web.filter.reactive.HiddenHttpMethodFilter. 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
Source File: ErrorHandlerConfiguration.java    From soul with 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 #2
Source File: SpringWebfluxAmqpApplication.java    From tutorials with 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 #3
Source File: GatewayAutoConfigurationTests.java    From spring-cloud-gateway with Apache License 2.0 5 votes vote down vote up
@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 File: SmakerSwagger2Application.java    From smaker with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public HiddenHttpMethodFilter hiddenHttpMethodFilter() {
    return new HiddenHttpMethodFilter() {
        @Override
        public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
            return chain.filter(exchange);
        }
    };
}
 
Example #5
Source File: LearningSpringBootChatApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #6
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #7
Source File: WebappApplication.java    From spring-5-examples with MIT License 4 votes vote down vote up
@Bean
@Order(Ordered.HIGHEST_PRECEDENCE)
public HiddenHttpMethodFilter hiddenHttpMethodFilter() {
  return new HiddenHttpMethodFilter();
}
 
Example #8
Source File: LearningSpringBootImagesApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #9
Source File: LearningSpringBootImagesApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #10
Source File: LearningSpringBootImagesApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #11
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #12
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #13
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #14
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #15
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #16
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #17
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #18
Source File: LearningSpringBootImagesApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #19
Source File: LearningSpringBootImagesApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #20
Source File: LearningSpringBootImagesApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #21
Source File: LearningSpringBootChatApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #22
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #23
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}
 
Example #24
Source File: LearningSpringBootApplication.java    From Learning-Spring-Boot-2.0-Second-Edition with MIT License 4 votes vote down vote up
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
	return new HiddenHttpMethodFilter();
}