JAVA Spring配置问题
<beanid="sessionFactory"class="org.springframework.orm.hibernate3.LocalSessionFactory...
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource"/>
</property>
<property name="mappingResources">
<list>
<!-- pojo Begin -->
<value>com/sh/chinanet/pojo/TLogLogout.hbm.xml</value>
<value>com/sh/chinanet/pojo/TPortalUserInfo.hbm.xml</value>
<value>com/sh/chinanet/pojo/TPortalUserHeartbrat.hbm.xml</value>
<value>com/sh/chinanet/pojo/TLogTyUserGetpwd.hbm.xml</value>
<!-- pojo End -->
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${portal.dialect}</prop>
<prop key="hibernate.query.substitutions">true=1 false=0</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="connection.pool_size">${portal.maxActive}</prop>
<prop key="current_session_context_class">thread</prop>
</props>
</property>
</bean>
是不是配置了这个 根本就不需要hibernate.cfg.xml配置文件了啊? 展开
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource"/>
</property>
<property name="mappingResources">
<list>
<!-- pojo Begin -->
<value>com/sh/chinanet/pojo/TLogLogout.hbm.xml</value>
<value>com/sh/chinanet/pojo/TPortalUserInfo.hbm.xml</value>
<value>com/sh/chinanet/pojo/TPortalUserHeartbrat.hbm.xml</value>
<value>com/sh/chinanet/pojo/TLogTyUserGetpwd.hbm.xml</value>
<!-- pojo End -->
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${portal.dialect}</prop>
<prop key="hibernate.query.substitutions">true=1 false=0</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="connection.pool_size">${portal.maxActive}</prop>
<prop key="current_session_context_class">thread</prop>
</props>
</property>
</bean>
是不是配置了这个 根本就不需要hibernate.cfg.xml配置文件了啊? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询