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

com.icthh.xm.commons.logging.web.spring.config.RestLoggingAspectConfiguration Maven / Gradle / Ivy

There is a newer version: 4.0.17
Show newest version
package com.icthh.xm.commons.logging.web.spring.config;

import com.icthh.xm.commons.logging.config.LoggingConfigService;
import com.icthh.xm.commons.logging.web.aop.RestCallLoggingAspect;
import com.icthh.xm.commons.logging.web.aop.RestLoggingAspect;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
@EnableAspectJAutoProxy
public class RestLoggingAspectConfiguration {

    @Bean
    @ConditionalOnProperty(value = "aspects.rest-logging", matchIfMissing = true)
    public RestLoggingAspect restLoggingAspect(LoggingConfigService loggingConfigService) {
        return new RestLoggingAspect(loggingConfigService);
    }

    @Bean
    @ConditionalOnProperty("aspects.rest-call-logging")
    public RestCallLoggingAspect restCallLoggingAspect() {
        return new RestCallLoggingAspect();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy