org.springframework.web.reactive.config.WebFluxConfigurer Java Examples
The following examples show how to use
org.springframework.web.reactive.config.WebFluxConfigurer.
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: OpenAPI2SpringBoot.java From openapi-generator with Apache License 2.0 | 6 votes |
@Bean public WebFluxConfigurer webConfigurer() { return new WebFluxConfigurer() { /*@Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("*") .allowedMethods("*") .allowedHeaders("Content-Type"); }*/ @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); } }; }
Example #2
Source File: ReactiveWebServerInitializer.java From spring-fu with Apache License 2.0 | 4 votes |
public EnableWebFluxConfigurationWrapper(GenericApplicationContext context, WebFluxProperties webFluxProperties) { super(webFluxProperties, context.getBeanProvider(WebFluxRegistrations.class)); setConfigurers(new ArrayList<>(context.getBeansOfType(WebFluxConfigurer.class).values())); }
Example #3
Source File: ProxyResponseAutoConfiguration.java From spring-cloud-gateway with Apache License 2.0 | 4 votes |
@Override public void configureArgumentResolvers(ArgumentResolverConfigurer configurer) { WebFluxConfigurer.super.configureArgumentResolvers(configurer); configurer .addCustomResolver(context.getBean(ProxyExchangeArgumentResolver.class)); }