org.zodiac.autoconfigure.log.PlatformLogPublisherReactiveAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.log;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
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;
@SpringBootConfiguration
@ConditionalOnPatformLogRequestEnabled
@ConditionalOnWebApplication(type = Type.REACTIVE)
@AutoConfigureBefore(value = {PlatformLogToolAutoConfiguration.class})
@ConditionalOnClass(value = {org.zodiac.log.LogOperations.class, org.springframework.web.server.WebHandler.class, org.springframework.web.reactive.DispatcherHandler.class})
public class PlatformLogPublisherReactiveAutoConfiguration {
@Bean
@ConditionalOnMissingBean(value = {org.zodiac.log.publisher.ApiLogPublisher.class})
protected org.zodiac.log.publisher.ApiLogPublisher apiLogPublisher() {
return new org.zodiac.log.publisher.ReactiveApiLogApplicationPublisher();
}
@Bean
@ConditionalOnMissingBean(value = {org.zodiac.log.publisher.ErrorLogPublisher.class})
protected org.zodiac.log.publisher.ErrorLogPublisher errorLogPublisher() {
return new org.zodiac.log.publisher.ReactiveErrorLogApplicationPublisher();
}
@Bean
@ConditionalOnMissingBean(value = {org.zodiac.log.publisher.UsualLogPublisher.class})
protected org.zodiac.log.publisher.UsualLogPublisher usualLogPublisher() {
return new org.zodiac.log.publisher.ReactiveUsualLogApplicationPublisher();
}
}