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

org.zodiac.autoconfigure.boot.PlatformBootServletAutoConfiguration 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.SERVLET)
@ConditionalOnClass(value = {javax.servlet.Servlet.class, org.springframework.web.servlet.DispatcherServlet.class})
public class PlatformBootServletAutoConfiguration {

    public PlatformBootServletAutoConfiguration() {
        super();
    }

    @Bean
    @ConditionalOnMissingBean(value = {org.zodiac.core.web.HttpHeadersGetter.class})
    @ConditionalOnClass(value = {org.zodiac.core.web.config.HttpContextInfo.class})
    protected org.zodiac.core.web.servlet.ServletHttpHeadersGetter httpHeadersGetter(HttpContextProperties contextProperties) {
        return new org.zodiac.core.web.servlet.ServletHttpHeadersGetter(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.servlet.ServletHttpHeadersGetter httpHeadersGetter) {
        return new org.zodiac.core.context.platform.ServletPlatformServiceContext(contextProperties, httpHeadersGetter);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy