package com.cdm.framework.operatelog.config;

import com.cdm.framework.operatelog.core.aop.OperateLogAspect;
import com.cdm.framework.operatelog.core.service.OperateLogFrameworkService;
import com.cdm.framework.operatelog.core.service.OperateLogFrameworkServiceImpl;
import com.cdm.module.system.api.logger.OperateLogApi;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

@AutoConfiguration
public class CdmOperateLogAutoConfiguration {

    @Bean
    public OperateLogAspect operateLogAspect() {
        return new OperateLogAspect();
    }

    @Bean
    public OperateLogFrameworkService operateLogFrameworkService(OperateLogApi operateLogApi) {
        return new OperateLogFrameworkServiceImpl(operateLogApi);
    }

}
