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

org.zodiac.autoconfigure.boot.PlatformBootReactiveAutoConfiguration Maven / Gradle / Ivy

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

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.web.HttpContextProperties;

@SpringBootConfiguration
@ConditionalOnWebApplication(type = Type.REACTIVE)
@ConditionalOnClass(value = {org.springframework.web.server.WebHandler.class, org.springframework.web.reactive.DispatcherHandler.class})
public class PlatformBootReactiveAutoConfiguration {

    public PlatformBootReactiveAutoConfiguration() {
        super();
    }

    @Bean
    @ConditionalOnMissingBean(value = {org.zodiac.core.web.HttpHeadersGetter.class})
    @ConditionalOnClass(value = {org.zodiac.core.web.config.HttpContextInfo.class})
    protected org.zodiac.core.web.reactive.ReactiveHttpHeadersGetter httpHeadersGetter(HttpContextProperties contextProperties) {
        return new org.zodiac.core.web.reactive.ReactiveHttpHeadersGetter(contextProperties);
    }

    @Bean
    @ConditionalOnMissingBean
    @ConditionalOnClass(value = {org.zodiac.core.web.config.HttpContextInfo.class})
    protected org.zodiac.core.context.platform.ServiceContext serviceContext(HttpContextProperties contextProperties,
        org.zodiac.core.web.reactive.ReactiveHttpHeadersGetter httpHeadersGetter) {
        return new org.zodiac.core.context.platform.ReactivePlatformServiceContext(contextProperties, httpHeadersGetter);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy