package com.njzscloud.common.sn.config;

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

    @Bean
    public SnConfigService sysSnConfigService(SnIncService snIncService) {
        return new SnConfigService(snIncService);
    }

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