package cn.newfeifan.mall.framework.operatelog.config;

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

@AutoConfiguration
public class FeifanOperateLogAutoConfiguration {

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

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

}
