package com.njzscloud.common.gen.config;

import com.njzscloud.common.gen.TplController;
import com.njzscloud.common.gen.TplService;
import com.njzscloud.common.gen.support.DbMetaData;
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 TplService sysTplService() {
        return new TplService();
    }

    @Bean
    public TplController sysTplController(TplService tplService) {
        return new TplController(tplService);
    }

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