org.springframework.boot.web.reactive.context.ReactiveWebApplicationContext Java Examples

The following examples show how to use org.springframework.boot.web.reactive.context.ReactiveWebApplicationContext. 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: FunctionExporterInitializer.java    From spring-cloud-function with Apache License 2.0 6 votes vote down vote up
private boolean isExporting(GenericApplicationContext context) {
	Boolean enabled = context.getEnvironment().getProperty("spring.cloud.function.web.export.enabled",
			Boolean.class);
	if (enabled != null) {
		return enabled;
	}
	if (ClassUtils.isPresent("org.springframework.web.context.WebApplicationContext",
			getClass().getClassLoader())) {
		if (context instanceof WebApplicationContext || context instanceof ReactiveWebApplicationContext
				|| context.getEnvironment() instanceof ConfigurableWebEnvironment
				|| context.getEnvironment() instanceof ConfigurableReactiveWebEnvironment) {
			return false;
		}
	}
	return true;
}
 
Example #2
Source File: WebConfig.java    From webFluxTemplate with MIT License 5 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfigurer(ReactiveWebApplicationContext applicationContext) {
	FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
	configurer.setTemplateLoaderPath("classpath:/templates/");
	configurer.setResourceLoader(applicationContext);
	return configurer;
}