Commit 176a1891 authored by hanbing's avatar hanbing

[update] 删除MyBatis配置文件

parent 793c8e63
package net.wanji.opt.config;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.io.Reader;
import java.util.Properties;
@Configuration
public class MyBatisConfig {
@Bean
public SqlSessionFactory sqlSessionFactory() throws Exception {
Properties props = new Properties();
props.setProperty("holodb", "holo_roadnet_jinan"); // 或从某些配置源获取数据库名称
Reader reader = Resources.getResourceAsReader("mybatis-config.xml");
return new SqlSessionFactoryBuilder().build(reader, props);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment