applicationContext(数据库连接池).xml
来源:互联网 发布:网络课程都有什么 编辑:程序博客网 时间:2024/06/01 09:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</property>
<property name="url">
<value>jdbc:microsoft:sqlserver://219.232.240.187:1433;DatabaseName=demo;SelectMethod=Cursor</value>
</property>
<property name="username">
<value>news</value>
</property>
<property name="password">
<value>news</value>
</property>
<property name="maxActive">
<value>10</value>
</property>
<property name="maxIdle">
<value>2</value>
</property>
<property name="maxWait">
<value>120000</value>
</property>
<property name="defaultAutoCommit">
<value>true</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>hibernate.cfg.xml</value>
<value>beans/Users.hbm.xml</value>
<value>beans/Address.hbm.xml</value>
<value>beans/Meeting.hbm.xml</value>
<value>beans/Notice.hbm.xml</value>
<value>beans/Schedule.hbm.xml</value>
<value>beans/Sms.hbm.xml</value>
<value>beans/Worklog.hbm.xml</value>
<value>beans/Attendtime.hbm.xml</value>
</list>
</property>
</bean>
<!--class="org.springframework.orm.hibernate3.HibernateTransactionManager">-->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<!-- 配置DAO -->
<bean id="userDAO" class="DAO.UserDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="addressDAO" class="DAO.AddressDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="scheduleDAO" class="DAO.ScheduleDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="worklogDAO" class="DAO.WorklogDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="smsDAO" class="DAO.SmsDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="noticeDAO" class="DAO.NoticeDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="meetingDAO" class="DAO.MeetingDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="attTimeDAO" class="DAO.AttTimeDAOImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<!-- 配置DAO -->
<!-- 配置Service -->
<bean id="userService" class="service.UserServiceImpl">
<property name="userDAO">
<ref local="userDAO" />
</property>
</bean>
<bean id="addressService" class="service.AddressServiceImpl">
<property name="addressDAO">
<ref local="addressDAO" />
</property>
</bean>
<bean id="scheduleService" class="service.ScheduleServiceImpl">
<property name="scheduleDAO">
<ref local="scheduleDAO" />
</property>
</bean>
<bean id="worklogService" class="service.WorklogServiceImpl">
<property name="worklogDAO">
<ref local="worklogDAO" />
</property>
</bean>
<bean id="smsService" class="service.SmsServiceImpl">
<property name="smsDAO">
<ref local="smsDAO" />
</property>
</bean>
<bean id="noticeService" class="service.NoticeServiceImpl">
<property name="noticeDAO">
<ref local="noticeDAO" />
</property>
</bean>
<bean id="meetingService" class="service.MeetingServiceImpl">
<property name="meetingDAO">
<ref local="meetingDAO" />
</property>
</bean>
<bean id="attTimeService" class="service.AttTimeServiceImpl">
<property name="attTimeDAO">
<ref local="attTimeDAO" />
</property>
</bean>
<!-- 配置Service -->
<!-- 定义Struts配置 -->
<bean name="loginAction" class="myaction.LoginAction">
<property name="userService">
<ref local="userService" />
</property>
</bean>
<bean name="logoutAction" class="myaction.LogoutAction">
<property name="userService">
<ref local="userService" />
</property>
</bean>
<bean name="registerAction" class="myaction.RegisterAction">
<property name="userService">
<ref local="userService" />
</property>
</bean>
<bean name="addressAction" class="myaction.AddressAction">
<property name="addressService">
<ref local="addressService" />
</property>
</bean>
<bean name="scheduleAction" class="myaction.ScheduleAction">
<property name="scheduleService">
<ref local="scheduleService" />
</property>
</bean>
<bean name="worklogAction" class="myaction.WorklogAction">
<property name="worklogService">
<ref local="worklogService" />
</property>
</bean>
<bean name="smsAction" class="myaction.SmsAction">
<property name="smsService">
<ref local="smsService" />
</property>
</bean>
<bean name="noticeAction" class="myaction.NoticeAction">
<property name="noticeService">
<ref local="noticeService" />
</property>
</bean>
<bean name="meetingAction" class="myaction.MeetingAction">
<property name="meetingService">
<ref local="meetingService" />
</property>
</bean>
<bean name="attTimeAction" class="myaction.AttTimeAction">
<property name="attTimeService">
<ref local="attTimeService" />
</property>
</bean>
</beans>
- applicationContext(数据库连接池).xml
- applicationContext.xml中配置数据库连接池
- applicationContext.xml中数据库连接池配置
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- ApplicationContext.xml
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- applicationContext.xml
- 转载分享
- STL中用erase()方法遍历删除元素
- Oracle 查找未用 编码
- 学习vb6.0视频教程网址
- 指针和引用的区别
- applicationContext(数据库连接池).xml
- C++编译和链接 收藏
- SQL四种语言:DDL,DML,DCL,TCL
- c++(3)
- Nginx rewrite last 和break区别
- myeclipse调优
- Java NIO原理和使用
- 这几点JavaScript面向对象技术你知道吗?
- ASP.NET中cookie读写方法