-1

该行如何Configuration().configure().buildSessionFactory() 返回一个SessionFactory未由Configuration类实现的接口的对象?

4

1 回答 1

0

Hibernate 项目是开源的。欢迎您自己寻找

public SessionFactory buildSessionFactory() throws HibernateException {
    log.debug( "Preparing to build session factory with filters : " + filterDefinitions );
    secondPassCompile();
    validate();
    Environment.verifyProperties( properties );
    Properties copy = new Properties();
    copy.putAll( properties );
    PropertiesHelper.resolvePlaceHolders( copy );
    Settings settings = buildSettings( copy );

    return new SessionFactoryImpl(
            this,
            mapping,
            settings,
            getInitializedEventListeners(),
            sessionFactoryObserver
        );
}
于 2013-01-29T14:16:40.427 回答