package com.ga.common.config;

import com.ga.common.mybatis.AuditInterceptor;
import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 모든 com.ga 패키지 하위에서 @Mapper 가 붙은 인터페이스만 스캔.
 * (common.code / common.menu / common.system / common.notification / common.file / core.mapper.*)
 */
@Configuration
@MapperScan(basePackages = "com.ga", annotationClass = Mapper.class)
public class MyBatisConfig {

    @Bean
    public AuditInterceptor auditInterceptor() {
        return new AuditInterceptor();
    }
}
