SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environment);
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environment, properties);
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(inputStream, environment);
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(inputStream, environment, properties);
// 参数型别:
// reader: Reader
// inputStream: InputStream
// environment: String
// properties: Properties
其中, environment是配置文件mybatis-config.xml中的<environment id="xxx">
reader/inputStream
是针对配置文件mybatis-config.xml
创建的字符/字节输入流对象: