/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved.
 * <a>http://www.crunii.com</a>
 */
package com.crunii.micro.ds.config;

import com.crunii.micro.domain.common.hibernate.action.listener.OperLogListener;
import com.crunii.micro.ds.aop.OperLogAspect;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 田平 create 2021/4/2 16:43
 */
@Configuration
@ConditionalOnProperty(value = "spring.enableOperLog", havingValue = "true")
public class OperLogConfiguration {

	@Bean
	public OperLogListener regOperLogListener() {
		return new OperLogListener();
	}

	@Bean
	public OperLogAspect regOperLogAspect() {
		return new OperLogAspect();
	}

}
