package com.njzscloud.common.sn.config;

import com.njzscloud.common.sn.IncSnService;
import com.njzscloud.common.sn.SnConfigController;
import com.njzscloud.common.sn.SnConfigService;
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 IncSnService sysIncSnService() {
        return new IncSnService();
    }

    @Bean
    public SnConfigService sysSnConfigService(IncSnService incSnService) {
        return new SnConfigService(incSnService);
    }

    @Bean
    public SnConfigController sysSnConfigController(SnConfigService snConfigService) {
        return new SnConfigController(snConfigService);
    }
}
