81,092
社区成员
发帖
与我相关
我的任务
分享
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd"
default-autowire="no" default-lazy-init="false"
default-dependency-check="none">
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>
<bean id="mapper" class="com.rango.orm.impl.MapperImpl">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<bean id="page" class="com.rango.orm.impl.MsSqlPage"></bean>
<bean id="baseDao"
class="org.springframework.aop.framework.ProxyFactoryBean"
abstract="true">
<property name="proxyInterfaces">
<value>com.rango.dao.IBaseDao</value>
</property>
</bean>
<bean id="abstractBaseDao"
class="com.rango.dao.impl.AbstractBaseDaoImpl" abstract="true">
<property name="mapper" ref="mapper"></property>
<property name="page" ref="page"></property>
</bean>
<bean id="commonDao" parent="baseDao">
<property name="proxyInterfaces">
<value>com.rango.dao.ICommonDao</value>
</property>
<property name="target">
<bean class="com.rango.dao.impl.CommonDao"
parent="abstractBaseDao" />
</property>
</bean>
<dwr:configuration>
<dwr:convert type="bean" class="com.rango.project.service.*"></dwr:convert>
<dwr:convert type="bean" class="com.rango.project.entity.*"></dwr:convert>
</dwr:configuration>
<bean id="oneService"
class="com.rango.project.service.OneService">
<property name="tblOneDao" ref="tblOneDao"></property>
<dwr:remote javascript="oneService" />
</bean>
<bean id="tblOneDao" parent="baseDao">
<property name="proxyInterfaces">
<value>com.rango.project.dao.ITblOneDao</value>
</property>
<property name="target">
<bean class="com.rango.project.dao.impl.TblOneDao"
parent="abstractBaseDao" />
</property>
</bean>
<!-- <import resource="file:../MVC/spring/dao.xml"/>
<import resource="file:../MVC/spring/dwr-service.xml"/>
<bean id="commonDao" class="com.rango.dao.impl.CommonDao" parent="abstractBaseDao" ></bean>-->
<!-- <bean id="singleDao" class="com.rango.dao.impl.AbstractSingleDaoImpl" parent="abstractBaseDao" abstract="true"></bean>-->
</beans>
<dwr:configuration>
<dwr:convert type="bean" class="com.rango.project.service.*"></dwr:convert>
<dwr:convert type="bean" class="com.rango.project.entity.*"></dwr:convert>
</dwr:configuration>
<bean id="oneService"
class="com.rango.project.service.OneService">
<property name="tblOneDao" ref="tblOneDao"></property>
<dwr:remote javascript="oneService" />
</bean>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param>
<!--<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
-->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>