<!-- 配置数据源 -->
<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/NoticeManager">
</property>
<property name="username" value="root"/>
<property name="password" value="root"/>
</bean>
<!-- 配置jdbcTemplate -->
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"></property>
</bean>
<!-- 配置sessionFactory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
</bean>
<!-- 配置事务管理器 -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
下载SSH框架地址:http://download.csdn.net/source/2743146
分享到:
相关推荐
Hibernate配置文件中配置各种数据库的driver、URL
hibernate配置,详细的讲了hibernate用的配置文件和方法,可以哦
Hibernate配置文件hibernate.cfg.xml中配置信息详解!
逆向生成hibernate配置文件逆向生成hibernate配置文件逆向生成hibernate配置文件逆向生成hibernate配置文件逆向生成hibernate配置文件逆向生成hibernate配置文件
hibernate配置文件 里面提供了连接数据库 数据库使用的方言 是否打印SQL语句 sql语句的格式 以及对象-关系映射文件的地址等
使用反射机制修改加载到内存的Hibernate配置文件,使用该方法可以将数据库的配置信息提取到别的路径下。
struts2+spring+hibernate 配置文件struts2+spring+hibernate 配置文件
hibernate--5.Hibernate配置文件详解
SpringMVC+Spring+hibernate配置
hibernate 配置 C3P0 连接池
如何使用用myeclipse自动生成hibernate配置文件
springboot2.0多数据源集成hibernate配置hibernateDaoSupport, dao层继承hibernateDaoSupport, 不使用jpa方式。
Hibernate配置文件Hibernate配置文件Hibernate配置文件
hibernate所以配置以及简单的介绍
hibernate的配置介绍,在myeclipse中配置hibernate,hibernate已经在myeclipse中了,创建工程,然后在工程中添加hibernate框架,一些设置
JAVA 使用hibernate配置实例,包括普通java工程版本(不是web工程)和maven配置使用hibernate版本。
Hibernate配置详解,详细描述了Hibernate的配置文件,一对一 一对多,多对多的单双向配置详解。
NULL 博文链接:https://hi-beijing.iteye.com/blog/1174299
帮助大家在配置hibernate方面提供支持