Search in sources :

Example 16 with ReactiveAdapterRegistry

use of org.springframework.core.ReactiveAdapterRegistry in project spring-framework by spring-projects.

the class RequestParamMethodArgumentResolverTests method setup.

@Before
public void setup() throws Exception {
    ReactiveAdapterRegistry adapterRegistry = new ReactiveAdapterRegistry();
    this.resolver = new RequestParamMethodArgumentResolver(null, adapterRegistry, true);
    ConfigurableWebBindingInitializer initializer = new ConfigurableWebBindingInitializer();
    initializer.setConversionService(new DefaultFormattingConversionService());
    this.bindContext = new BindingContext(initializer);
}
Also used : ConfigurableWebBindingInitializer(org.springframework.web.bind.support.ConfigurableWebBindingInitializer) ReactiveAdapterRegistry(org.springframework.core.ReactiveAdapterRegistry) BindingContext(org.springframework.web.reactive.BindingContext) DefaultFormattingConversionService(org.springframework.format.support.DefaultFormattingConversionService) Before(org.junit.Before)

Aggregations

ReactiveAdapterRegistry (org.springframework.core.ReactiveAdapterRegistry)16 Before (org.junit.Before)10 Method (java.lang.reflect.Method)6 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)5 MethodParameter (org.springframework.core.MethodParameter)5 Test (org.junit.Test)4 SynthesizingMethodParameter (org.springframework.core.annotation.SynthesizingMethodParameter)4 BindingContext (org.springframework.web.reactive.BindingContext)4 DefaultFormattingConversionService (org.springframework.format.support.DefaultFormattingConversionService)2 ModelAttribute (org.springframework.web.bind.annotation.ModelAttribute)2 ConfigurableWebBindingInitializer (org.springframework.web.bind.support.ConfigurableWebBindingInitializer)2 Mono (reactor.core.publisher.Mono)2 ArrayList (java.util.ArrayList)1 StringDecoder (org.springframework.core.codec.StringDecoder)1 DecoderHttpMessageReader (org.springframework.http.codec.DecoderHttpMessageReader)1 HttpMessageReader (org.springframework.http.codec.HttpMessageReader)1 ServerHttpRequest (org.springframework.http.server.reactive.ServerHttpRequest)1 MockServerHttpRequest (org.springframework.mock.http.server.reactive.test.MockServerHttpRequest)1 MockServerHttpResponse (org.springframework.mock.http.server.reactive.test.MockServerHttpResponse)1 WebDataBinder (org.springframework.web.bind.WebDataBinder)1