spring 管理hibernate事物 得到的hibernatetemplate session都为空 hibernatespringsession管理null 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你这个是模仿的别的 demo 还是教程?配置文件发一下看看。 application <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"><!--数据源配置 --> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"></property> <property name="url" value="jdbc:mysql://localhost:3306/sysmanager"> </property> <property name="username" value="root"></property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="configLocation" value="classpath:hibernate.cfg.xml"> </property> <property name="mappingResources"> <list> <value> com/vst/configmanager/bean/SysConfigItem.hbm.xml </value> <value> com/vst/configmanager/bean/SysConfigCatalogue.hbm.xml </value> <value> com/vst/configmanager/bean/SysCongigIntent.hbm.xml </value></list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.hbm2ddl.auto">false</prop> </props> </property> </bean> <bean id="myaction" class="com.vst.configmanager.action.myAction"> <property name="myBiz" ref="myBiz"></property> </bean> <bean id="myBiz" class="com.vst.configmanager.biz.impl.MyBiz"> </bean> </beans> 如何获取当前系统时间中的小时?要求24进制的 更新一下“高手进进进” 帮忙看一个el表达式。 这个 servlet 操作数据库多个表不成功,怎么办?在线等。 初学JSP,请问如何实现 ABCD倒过来DCBA的效果 关于JSP中的字符串的问题,请高手指教 Hibernate测试例子出NoClassDefFoundError错误 Applet&Script.... jsp怎么连接access数据库呀! 关于Jreport和Jsp整合开发(高分相赠) 局部刷新 axis2-1.5 通讯设置代理服务器问题
配置文件发一下看看。
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"><!--数据源配置 -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql://localhost:3306/sysmanager">
</property>
<property name="username" value="root"></property>
</bean> <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation" value="classpath:hibernate.cfg.xml"> </property>
<property name="mappingResources">
<list>
<value>
com/vst/configmanager/bean/SysConfigItem.hbm.xml
</value>
<value>
com/vst/configmanager/bean/SysConfigCatalogue.hbm.xml
</value>
<value>
com/vst/configmanager/bean/SysCongigIntent.hbm.xml
</value></list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">false</prop>
</props>
</property>
</bean>
<bean id="myaction"
class="com.vst.configmanager.action.myAction">
<property name="myBiz" ref="myBiz"></property>
</bean>
<bean id="myBiz"
class="com.vst.configmanager.biz.impl.MyBiz">
</bean>
</beans>