首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

srping 3.1 治理hibernate 持久化对象的配置

2012-09-23 
srping 3.1管理hibernate 持久化对象的配置1:注解的方式bean idsessionFactory //propertypropert

srping 3.1 管理hibernate 持久化对象的配置
1:注解的方式

<bean id="sessionFactory" /></property><property name="hibernateProperties"><props><prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop><prop key="hibernate.show_sql">true</prop><prop key="hibernate.connection.proxool_provider_class">org.hibernate.connection.ProxoolConnectionProvider</prop><prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop><prop key="hibernate.show_sql">true</prop><prop key="hibernate.format_sql">false</prop><prop key="hibernate.use_sql_comments">true</prop><prop key="hibernate.connection.autocommit">true</prop>      <prop key="hibernate.cglib.use_reflection_optimizer">true</prop><prop key="hibernate.bytecode.use_reflection_optimizer">true</prop></props></property>

2:xml 文式
<!-- 配置Hibernate的sessionFactory --><bean id="sessionFactory" /></property><property name="hibernateProperties"><props><prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop><prop key="hibernate.show_sql">true</prop></props></property><property name="configLocation">            <value>classpath:conf/hibernate.cfg.xml</value>        </property>==========================hibernate.cfg.xml<hibernate-configuration><session-factory><mapping resource="personal/learn/entity/Manager.hbm.xml" /></session-factory></hibernate-configuration>

热点排行