All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.autoconfigure.web.remote.WebRemoteApiReactiveAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.web.remote;

import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.autoconfigure.web.reactive.WebFluxRegistrations;
import org.springframework.web.reactive.config.WebFluxConfigurer;
import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping;
import org.zodiac.core.web.remote.reactive.RemoteApiFilterReactiveInterceptor;
import org.zodiac.core.web.remote.reactive.RemoteApiHandlerMapping;

@SpringBootConfiguration
@ConditionalOnWebApplication(type = Type.REACTIVE)
public class WebRemoteApiReactiveAutoConfiguration implements WebFluxConfigurer, WebFluxRegistrations {

    private com.fasterxml.jackson.databind.ObjectMapper objectMapper;

    private RemoteApiFilterReactiveInterceptor remoteApiFilterInterceptor;

    public WebRemoteApiReactiveAutoConfiguration(ObjectProvider objectMapperProvider,
        ObjectProvider remoteApiFilterInterceptorProvider) {
        this.objectMapper = objectMapperProvider.getIfAvailable();
        this.remoteApiFilterInterceptor = remoteApiFilterInterceptorProvider.getIfAvailable();
    }

    @Override
    public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
        return new RemoteApiHandlerMapping();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy