package com.njzscloud.common.sn.config;

import com.njzscloud.common.sn.SysIncSnService;
import com.njzscloud.common.sn.SysSnConfigController;
import com.njzscloud.common.sn.SysSnConfigService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@MapperScan("com.njzscloud.common.sn")
@EnableConfigurationProperties(SnProperties.class)
public class SnAutoConfiguration {

    @Bean
    public SysIncSnService sysIncSnService() {
        return new SysIncSnService();
    }

    @Bean
    public SysSnConfigService sysSnConfigService(SysIncSnService sysIncSnService) {
        return new SysSnConfigService(sysIncSnService);
    }

    @Bean
    public SysSnConfigController sysSnConfigController(SysSnConfigService sysSnConfigService) {
        return new SysSnConfigController(sysSnConfigService);
    }
}
