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

org.zodiac.autoconfigure.log.PlatformLogPublisherServletAutoConfiguration Maven / Gradle / Ivy

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

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
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.log.condition.ConditionalOnPatformLogRequestEnabled;
import org.zodiac.autoconfigure.security.http.servlet.SecurityHttpServletAutoConfiguration;

@SpringBootConfiguration
@ConditionalOnPatformLogRequestEnabled
@ConditionalOnWebApplication(type = Type.SERVLET)
@AutoConfigureAfter(value = SecurityHttpServletAutoConfiguration.class)
//@AutoConfigureBefore(value = {PlatformLogToolAutoConfiguration.class})
@ConditionalOnClass(value = {org.zodiac.log.LogOperations.class, javax.servlet.Servlet.class, org.springframework.web.servlet.DispatcherServlet.class})
public class PlatformLogPublisherServletAutoConfiguration {

    public PlatformLogPublisherServletAutoConfiguration() {
        super();
    }

    @Bean
    @ConditionalOnMissingBean(value = {org.zodiac.log.publisher.ApiLogPublisher.class})
    protected org.zodiac.log.publisher.ApiLogPublisher apiLogPublisher() {
        return new org.zodiac.log.publisher.ServletApiLogApplicationPublisher();
    }

    @Bean
    @ConditionalOnMissingBean(value = {org.zodiac.log.publisher.ErrorLogPublisher.class})
    protected org.zodiac.log.publisher.ErrorLogPublisher errorLogPublisher() {
        return new org.zodiac.log.publisher.ServletErrorLogApplicationPublisher();
    }

    @Bean
    @ConditionalOnMissingBean(value = {org.zodiac.log.publisher.UsualLogPublisher.class})
    protected org.zodiac.log.publisher.UsualLogPublisher usualLogPublisher() {
        return new org.zodiac.log.publisher.ServletUsualLogApplicationPublisher();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy