hibernate 缓存配置
由于本人水平有限,欢迎提出宝贵意见。
<?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"
value="root"></property>
<property name="password" value="123456"></property>
</bean>
-->
<bean id="hibernateInterceptor"
/>
</property>
</bean>
<bean id="sessionFactory"
/>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<!-- 表示允许自动提交 -->
<prop key="hibernate.connection.autocommit">true</prop>
<!-- 显示sql语句 -->
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>org/bubu/bean/User.hbm.xml</value>
<value>org/bubu/bean/Item.hbm.xml</value>
<value>org/bubu/bean/Subitem.hbm.xml</value>
<value>org/bubu/bean/Gonggao.hbm.xml</value>
<value>org/bubu/bean/Adminuser.hbm.xml</value>
<value>org/bubu/bean/Role.hbm.xml</value>
<value>org/bubu/bean/Privilege.hbm.xml</value>
<value>org/bubu/bean/Flash.hbm.xml</value>
<value>org/bubu/bean/Navleft.hbm.xml</value>
<value>org/bubu/bean/Leftinfo.hbm.xml</value>
<value>org/bubu/bean/Label.hbm.xml</value>
<value>org/bubu/bean/Sublabel.hbm.xml</value>
<value>org/bubu/bean/Focus.hbm.xml</value>
<value>org/bubu/bean/Special.hbm.xml</value>
<value>org/bubu/bean/Latestnews.hbm.xml</value>
<value>org/bubu/bean/Orders.hbm.xml</value>
<value>org/bubu/bean/Orderitem.hbm.xml</value>
<value>org/bubu/bean/Question.hbm.xml</value>
<value>org/bubu/bean/Quesansw.hbm.xml</value>
<value>org/bubu/bean/Answer.hbm.xml</value>
<value>org/bubu/bean/Orderdiscount.hbm.xml</value>
<value>org/bubu/bean/UserUser.hbm.xml</value>
<value>org/bubu/bean/Ans.hbm.xml</value>
<value>org/bubu/bean/Ques.hbm.xml</value>
<value>org/bubu/bean/GgAdminuser.hbm.xml</value>
<value>org/bubu/bean/GgGuanggao.hbm.xml</value>
<value>org/bubu/bean/GgGonggao.hbm.xml</value>
<value>org/bubu/bean/GgBest.hbm.xml</value>
<value>org/bubu/bean/GgLogo.hbm.xml</value>
<value>org/bubu/bean/GgLeft.hbm.xml</value>
<value>org/bubu/bean/GgLeftinfo.hbm.xml</value>
<value>org/bubu/bean/GgFahuo.hbm.xml</value></list>
</property></bean>
<bean id="transactionManager" abstract="true"></bean>
<bean id="iuserdaoimpl" parent="iuserdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iitemdao" abstract="true"></bean>
<bean id="iitemdaoimpl" parent="iitemdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="isubitemdao" abstract="true"></bean>
<bean id="isubitemdaoimpl" abstract="true"/>
<bean id="iadminuserdaoimpl" parent="iadminuserdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iprivilegedao" abstract="true"/>
<bean id="iprivilegedaoimpl" parent="iprivilegedao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iroledao" abstract="true"/>
<bean id="iroledaoimpl" parent="iroledao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iflashdao" abstract="true"/>
<bean id="iflashdaoimpl" parent="iflashdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="inavleftdao" abstract="true"/>
<bean id="inavleftdapimpl" abstract="true"/>
<bean id="ileftinfodaoimpl" abstract="true"/>
<bean id="ilabeldaoimpl" parent="ilabeldao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="isublabeldao" abstract="true"/>
<bean id="isublabeldaoimpl" parent="isublabeldao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="ifocusdao" abstract="true"/>
<bean id="ifocusdaoimpl" parent="ifocusdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="ispecialdao" abstract="true"/>
<bean id="ispecialdaoimpl" parent="ispecialdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="ilatestnewsdao" abstract="true"/>
<bean id="ilatestnewsdaoimpl" parent="ilatestnewsdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iquestiondao" abstract="true"/>
<bean id="iquestiondaoimpl" parent="iquestiondao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="ianswerdao" abstract="true"/>
<bean id="ianswerdaoimpl" parent="ianswerdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iquesansw" abstract="true"/>
<bean id="iquesanswimpl" parent="iquesansw">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iorderdiscountdao" abstract="true"/>
<bean id="iorderdiscountimpl" parent="iorderdiscountdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iorderdao" abstract="true"/>
<bean id="iorderdaoimpl" parent="iorderdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iuseruser" abstract="true"/>
<bean id="iuseruserimpl" parent="iuseruser">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iquesdao" abstract="true"/>
<bean id="iquesdaoimpl" parent="iquesdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<!--以下是广告dao -->
<bean id="iggguanggao" abstract="true"/>
<bean id="iggguanggaoimpl" parent="iggguanggao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iggbest" abstract="true"/>
<bean id="iggbestimpl" parent="iggbest">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<bean id="iggleftDAO" abstract="true"/>
<bean id="iggleftDAOImpl" parent="iggleftDAO">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"/>
</property>
</bean>
<!-- 事务管理 -->
<bean id="txProxyTemplate" abstract="true" />
<ref bean="methodCachePointCutAdvice"/>
</list>
</property>
</bean>
<bean id="userservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iuserdaoimpl"/>
</property>
</bean>
<bean id="leftinfoservice" parent="txProxyTemplate">
<property name="target">
<ref bean="ileftinfodaoimpl"/>
</property>
</bean>
<bean id="navleftservice" parent="txProxyTemplate">
<property name="target">
<ref bean="inavleftdapimpl"/>
</property>
</bean>
<bean id="flashservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iflashdaoimpl"/>
</property>
</bean>
<bean id="itemservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iitemdaoimpl"/>
</property>
</bean>
<bean id="labelservice" parent="txProxyTemplate">
<property name="target">
<ref bean="ilabeldaoimpl"/>
</property>
</bean>
<bean id="sublabelservice" parent="txProxyTemplate">
<property name="target">
<ref bean="isublabeldaoimpl"/>
</property>
</bean>
<bean id="focusservice" parent="txProxyTemplate">
<property name="target">
<ref bean="ifocusdaoimpl"/>
</property>
</bean>
<bean id="specialservice" parent="txProxyTemplate">
<property name="target">
<ref bean="ispecialdaoimpl"/>
</property>
</bean>
<bean id="latestnewsservice" parent="txProxyTemplate">
<property name="target">
<ref bean="ilatestnewsdaoimpl"/>
</property>
</bean>
<bean id="questionservice" parent="txProxyTemplate" >
<property name="target">
<ref bean="iquestiondaoimpl"/>
</property>
</bean>
<bean id="answerservice" parent="txProxyTemplate">
<property name="target">
<ref bean="ianswerdaoimpl"/>
</property>
</bean>
<bean id="quesanswservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iquesanswimpl"/>
</property>
</bean>
<bean id="orderdiscountservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iorderdiscountimpl"/>
</property>
</bean>
<bean id="orderservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iorderdaoimpl"/>
</property>
</bean>
<bean id="useruseservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iuseruserimpl"/>
</property>
</bean>
<bean id="adminuserservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iadminuserdaoimpl"/>
</property>
</bean>
<bean id="quesservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iquesdaoimpl"/>
</property>
</bean>
<!--以下是广告dao service-->
<bean id="guanggaoservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iggguanggaoimpl"/>
</property>
</bean>
<bean id="ggbestservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iggbestimpl"/>
</property>
</bean>
<bean id="ggleftservice" parent="txProxyTemplate">
<property name="target">
<ref bean="iggleftDAOImpl"/>
</property>
</bean>
<bean name="/admin/common" class="org.bubu.struts.action.ShowleftinfoAction">
</bean>
</beans>