applicationContext.xml文件的配置
来源:互联网 发布:知彼而知己博客 编辑:程序博客网 时间:2024/06/01 08:19
<?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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<!-- 用来支持使用annotation,并且支持查找出来使用 annotation的类-->
<context:component-scan base-package="com.shoubei"/>
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.mysql.jdbc.Driver">
</property>
<property name="url" value="jdbc:mysql:///shoubei"></property>
<property name="username" value="root"></property>
<property name="password" value="admin"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource"></ref>
</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">update</prop>
</props>
</property>
<!-- packagesToScan是用来搜索用annotation配置的Bean -->
<property name="packagesToScan">
<list>
<value>com.shoubei</value>
</list>
</property>
</bean>
</beans>
- applicationContext.xml文件的配置
- 配置applicationcontext.xml文件
- applicationContext.xml文件配置
- 4applicationContext.xml的文件配置
- applicationContext.xml的配置
- applicationContext.xml文件完整配置
- applicationContext.xml文件完整配置
- Spring中关于applicationContext.xml文件的配置实例
- 在Spring的 applicationContext.xml文件中配置数据源
- ApplicationContext.xml文件配置的两种方式
- SSH框架中applicationContext.xml文件的配置
- Spring的配置文件ApplicationContext.xml配置头文件解析
- spring applicationContext.xml 文件头的配置说明
- Spring与Hibernate整合的applicationContext.xml文件配置
- 典型的applicationContext.xml 配置
- applicationContext-dao.xml的配置
- 一个ApplicationContext.xml的配置
- JDBC 的 applicationContext.XML配置
- 用Jsp来实现文件下载功能的几种方式(2)
- 培养了不起男孩的100个细节
- 分享我的书架:一个五年程序员的学习观
- java基础整理11--Applet
- 动态改变DIV大小
- applicationContext.xml文件的配置
- VC 快捷键
- ASP.NET C#(4.0) + SQL2008 R2 多图片上传并生成缩略图一并保存至数据库
- web.xml文件的配置
- Sample log4j.properties file
- Ubuntu桌面版本和服务器版本之间的区别
- [转]验证数字的正则表达式集
- 一个c++模板的例子(类型依赖)说明
- sql server 聚合函数对null值的处理