org.springframework.web.reactive.config.ViewResolverRegistry Java Examples

The following examples show how to use org.springframework.web.reactive.config.ViewResolverRegistry. 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: DefaultControllerSpecTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Test
public void configurerConsumers() {
	TestConsumer<ArgumentResolverConfigurer> argumentResolverConsumer = new TestConsumer<>();
	TestConsumer<RequestedContentTypeResolverBuilder> contenTypeResolverConsumer = new TestConsumer<>();
	TestConsumer<CorsRegistry> corsRegistryConsumer = new TestConsumer<>();
	TestConsumer<FormatterRegistry> formatterConsumer = new TestConsumer<>();
	TestConsumer<ServerCodecConfigurer> codecsConsumer = new TestConsumer<>();
	TestConsumer<PathMatchConfigurer> pathMatchingConsumer = new TestConsumer<>();
	TestConsumer<ViewResolverRegistry> viewResolverConsumer = new TestConsumer<>();

	new DefaultControllerSpec(new MyController())
			.argumentResolvers(argumentResolverConsumer)
			.contentTypeResolver(contenTypeResolverConsumer)
			.corsMappings(corsRegistryConsumer)
			.formatters(formatterConsumer)
			.httpMessageCodecs(codecsConsumer)
			.pathMatching(pathMatchingConsumer)
			.viewResolvers(viewResolverConsumer)
			.build();

	assertNotNull(argumentResolverConsumer.getValue());
	assertNotNull(contenTypeResolverConsumer.getValue());
	assertNotNull(corsRegistryConsumer.getValue());
	assertNotNull(formatterConsumer.getValue());
	assertNotNull(codecsConsumer.getValue());
	assertNotNull(pathMatchingConsumer.getValue());
	assertNotNull(viewResolverConsumer.getValue());

}
 
Example #2
Source File: DefaultControllerSpecTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Test
public void configurerConsumers() {
	TestConsumer<ArgumentResolverConfigurer> argumentResolverConsumer = new TestConsumer<>();
	TestConsumer<RequestedContentTypeResolverBuilder> contenTypeResolverConsumer = new TestConsumer<>();
	TestConsumer<CorsRegistry> corsRegistryConsumer = new TestConsumer<>();
	TestConsumer<FormatterRegistry> formatterConsumer = new TestConsumer<>();
	TestConsumer<ServerCodecConfigurer> codecsConsumer = new TestConsumer<>();
	TestConsumer<PathMatchConfigurer> pathMatchingConsumer = new TestConsumer<>();
	TestConsumer<ViewResolverRegistry> viewResolverConsumer = new TestConsumer<>();

	new DefaultControllerSpec(new MyController())
			.argumentResolvers(argumentResolverConsumer)
			.contentTypeResolver(contenTypeResolverConsumer)
			.corsMappings(corsRegistryConsumer)
			.formatters(formatterConsumer)
			.httpMessageCodecs(codecsConsumer)
			.pathMatching(pathMatchingConsumer)
			.viewResolvers(viewResolverConsumer)
			.build();

	assertNotNull(argumentResolverConsumer.getValue());
	assertNotNull(contenTypeResolverConsumer.getValue());
	assertNotNull(corsRegistryConsumer.getValue());
	assertNotNull(formatterConsumer.getValue());
	assertNotNull(codecsConsumer.getValue());
	assertNotNull(pathMatchingConsumer.getValue());
	assertNotNull(viewResolverConsumer.getValue());

}
 
Example #3
Source File: WebfluxConfig.java    From Hands-On-Reactive-Programming-with-Reactor with MIT License 4 votes vote down vote up
@Override
 public void configureViewResolvers(ViewResolverRegistry registry) {
     registry.scriptTemplate();
  //   registry.freeMarker();
     registry.viewResolver(thymeleafChunkedAndDataDrivenViewResolver());
}
 
Example #4
Source File: App.java    From FrameworkBenchmarks with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    registry.viewResolver(mustacheViewResolver);
}
 
Example #5
Source File: WebConfig.java    From spring-reactive-sample with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    registry.viewResolver(thymeleafChunkedAndDataDrivenViewResolver());
}
 
Example #6
Source File: WebConfig.java    From spring-reactive-sample with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    registry.viewResolver(thymeleafChunkedAndDataDrivenViewResolver());
}
 
Example #7
Source File: WebConfig.java    From spring-reactive-sample with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    registry.viewResolver(thymeleafChunkedAndDataDrivenViewResolver());
}
 
Example #8
Source File: WebConfig.java    From spring-reactive-sample with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    registry.freeMarker();
}
 
Example #9
Source File: WebConfig.java    From spring-reactive-sample with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    registry.viewResolver(mustacheViewResolver());
}
 
Example #10
Source File: WebConfig.java    From spring-reactive-sample with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    registry.viewResolver(thymeleafChunkedAndDataDrivenViewResolver());
}
 
Example #11
Source File: WebConfig.java    From spring-reactive-sample with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    registry.freeMarker();
}
 
Example #12
Source File: WebfluxConfig.java    From Hands-On-Reactive-Programming-with-Reactor with MIT License 4 votes vote down vote up
@Override
 public void configureViewResolvers(ViewResolverRegistry registry) {
     registry.scriptTemplate();
     registry.freeMarker();
}
 
Example #13
Source File: WebfluxConfig.java    From Hands-On-Reactive-Programming-with-Reactor with MIT License 4 votes vote down vote up
@Override
 public void configureViewResolvers(ViewResolverRegistry registry) {
    // registry.scriptTemplate();
     //registry.freeMarker();
}
 
Example #14
Source File: WebfluxConfig.java    From Hands-On-Reactive-Programming-with-Reactor with MIT License 4 votes vote down vote up
@Override
 public void configureViewResolvers(ViewResolverRegistry registry) {
    // registry.scriptTemplate();
     //registry.freeMarker();
}
 
Example #15
Source File: WebfluxConfig.java    From Hands-On-Reactive-Programming-with-Reactor with MIT License 4 votes vote down vote up
@Override
 public void configureViewResolvers(ViewResolverRegistry registry) {
    // registry.scriptTemplate();
     //registry.freeMarker();
}
 
Example #16
Source File: LocaleContextResolverIntegrationTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
protected void configureViewResolvers(ViewResolverRegistry registry) {
	registry.viewResolver((viewName, locale) -> Mono.just(new DummyView(locale)));
}
 
Example #17
Source File: DefaultControllerSpec.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	if (this.viewResolversConsumer != null) {
		this.viewResolversConsumer.accept(registry);
	}
}
 
Example #18
Source File: DefaultControllerSpec.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public DefaultControllerSpec viewResolvers(Consumer<ViewResolverRegistry> consumer) {
	this.configurer.viewResolversConsumer = consumer;
	return this;
}
 
Example #19
Source File: RequestMappingViewResolutionIntegrationTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	registry.freeMarker();
}
 
Example #20
Source File: LocaleContextResolverIntegrationTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
protected void configureViewResolvers(ViewResolverRegistry registry) {
	registry.viewResolver((viewName, locale) -> Mono.just(new DummyView(locale)));
}
 
Example #21
Source File: DefaultControllerSpec.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	if (this.viewResolversConsumer != null) {
		this.viewResolversConsumer.accept(registry);
	}
}
 
Example #22
Source File: DefaultControllerSpec.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public DefaultControllerSpec viewResolvers(Consumer<ViewResolverRegistry> consumer) {
	this.configurer.viewResolversConsumer = consumer;
	return this;
}
 
Example #23
Source File: RequestMappingViewResolutionIntegrationTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	registry.freeMarker();
}
 
Example #24
Source File: WebTestClient.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Configure view resolution.
 * @see WebFluxConfigurer#configureViewResolvers
 */
ControllerSpec viewResolvers(Consumer<ViewResolverRegistry> consumer);
 
Example #25
Source File: WebTestClient.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Configure view resolution.
 * @see WebFluxConfigurer#configureViewResolvers
 */
ControllerSpec viewResolvers(Consumer<ViewResolverRegistry> consumer);