Search in sources :

Example 6 with ServerCodecConfigurer

use of org.springframework.http.codec.ServerCodecConfigurer in project spring-framework by spring-projects.

the class RouterFunctionMapping method afterPropertiesSet.

@Override
public void afterPropertiesSet() throws Exception {
    if (CollectionUtils.isEmpty(this.messageReaders)) {
        ServerCodecConfigurer codecConfigurer = ServerCodecConfigurer.create();
        this.messageReaders = codecConfigurer.getReaders();
    }
    if (this.routerFunction == null) {
        initRouterFunctions();
    }
    if (this.routerFunction != null) {
        RouterFunctions.changeParser(this.routerFunction, getPathPatternParser());
    }
}
Also used : ServerCodecConfigurer(org.springframework.http.codec.ServerCodecConfigurer)

Aggregations

ServerCodecConfigurer (org.springframework.http.codec.ServerCodecConfigurer)6 Test (org.junit.jupiter.api.Test)2 Method (java.lang.reflect.Method)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1 Bean (org.springframework.context.annotation.Bean)1 ReactiveAdapterRegistry (org.springframework.core.ReactiveAdapterRegistry)1 ByteArrayDecoder (org.springframework.core.codec.ByteArrayDecoder)1 ByteBufferDecoder (org.springframework.core.codec.ByteBufferDecoder)1 FormattingConversionService (org.springframework.format.support.FormattingConversionService)1 ServerSentEventHttpMessageWriter (org.springframework.http.codec.ServerSentEventHttpMessageWriter)1 Jackson2JsonEncoder (org.springframework.http.codec.json.Jackson2JsonEncoder)1 DefaultPartHttpMessageReader (org.springframework.http.codec.multipart.DefaultPartHttpMessageReader)1 MultipartHttpMessageReader (org.springframework.http.codec.multipart.MultipartHttpMessageReader)1 Validator (org.springframework.validation.Validator)1 LocalValidatorFactoryBean (org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)1 ConfigurableWebBindingInitializer (org.springframework.web.bind.support.ConfigurableWebBindingInitializer)1 HandlerMethod (org.springframework.web.method.HandlerMethod)1 InvocableHandlerMethod (org.springframework.web.reactive.result.method.InvocableHandlerMethod)1 SyncInvocableHandlerMethod (org.springframework.web.reactive.result.method.SyncInvocableHandlerMethod)1