struts2.2.1+hibernate3.6.0+spring3.0.5+proxool-0.9.1范例(2)

来源:互联网 发布:手机淘宝安卓历史版本 编辑:程序博客网 时间:2024/05/20 22:01

文献:http://www.verydemo.com/demo_c146_i22158.html

struts2.2.1+hibernate3.6.0+spring3.0.5+proxool-0.9.1实例(2)
applicationContext.xml.xml配置如下:
<?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"xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"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           http://www.springframework.org/schema/aop           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd           http://www.springframework.org/schema/tx            http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"><!-- 用注解方式注入bean,启动服务器时,spring会到com.yj查找所有带spring的注解(如:@Component),把他们注入到spring中 --><context:annotation-config/><context:component-scan base-package="com.yj"/><!-- hibernate sessionFactory 创建 --><bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"><property name="packagesToScan"><list><value>com.yj.model</value></list></property>…………………………………………………………………………
0 0