日期:2014-05-19 浏览次数:20832 次
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="myJSPAction" class="com.poscard.action.MyJSPAction"> <property name="userService"> <ref bean = "UserService"/> </property> </bean> <bean id="UserService" class="com.poscard.Service.UserService"> <property name="userDAO"> <ref bean = "UserDao"/> </property> </bean> <bean id="UserDao" class="com.poscard.DAOImpl.UserDAOImpl"> </bean> <!-- --> <bean id="jdbcDriver" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver"/> <property name="url" value="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=bbs2012"/> <property name="connection.username" value="sa"/> <property name="connection.password" value="123"/> </bean> <bean id="HibernateSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="jdbcDriver" /> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.SQLServerDialect </prop> <prop key="hibernate.show_sql">true</prop> </props> </property> <property name="mappingResources"> <list> <value>com/poscard/model/LoginUser.hbm.xml</value> </list> </property> </bean> </beans>