package com.njzscloud.common.gen.config;

import com.njzscloud.common.gen.support.DbMetaData;
import com.njzscloud.common.gen.SysTplController;
import com.njzscloud.common.gen.SysTplService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

@Configuration
@MapperScan("com.njzscloud.common.gen")
public class GenAutoConfiguration {

    @Bean
    public SysTplService sysTplService() {
        return new SysTplService();
    }

    @Bean
    public SysTplController sysTplController(SysTplService sysTplService) {
        return new SysTplController(sysTplService);
    }

    @Bean
    public DbMetaData dbMetaData(DataSource dataSource) {
        return new DbMetaData(dataSource);
    }
}
