spring-jpetstore 学习整理(二)
来源:互联网 发布:淘宝店铺微信营销 编辑:程序博客网 时间:2024/06/05 00:28
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- ========================= GENERAL DEFINITIONS ========================= -->
<!--
定义了一个PropertyPlaceholderConfigurer,把一些配置信息放在*.properties的文件里,在以后的调用中
可以使用"${名称}"的方式,进行调用(仅限制在配置文件中调用)
-->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>WEB-INF/mail.properties</value>
<value>WEB-INF/jdbc.properties</value>
</list>
</property>
</bean>
<!-- MailSender used by EmailAdvice -->
<!--
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host"><value>${mail.host}</value></property>
</bean>
-->
<!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->
<!-- Generic validator for Account objects, to be used for example by the Spring web tier -->
<bean id="accountValidator" class="org.springframework.samples.jpetstore.domain.logic.AccountValidator"/>
<!-- Generic validator for Order objects, to be used for example by the Spring web tier -->
<bean id="orderValidator" class="org.springframework.samples.jpetstore.domain.logic.OrderValidator"/>
<!-- JPetStore primary business object: default implementation -->
<bean id="petStoreTarget" class="org.springframework.samples.jpetstore.domain.logic.PetStoreImpl">
<property name="accountDao"><ref bean="accountDao"/></property>
<property name="categoryDao"><ref bean="categoryDao"/></property>
<property name="productDao"><ref bean="productDao"/></property>
<property name="itemDao"><ref bean="itemDao"/></property>
<property name="orderDao"><ref bean="orderDao"/></property>
</bean>
<!-- AOP advice used to send confirmation email after order has been submitted -->
<!--
<bean id="emailAdvice" class="org.springframework.samples.jpetstore.domain.logic.SendOrderConfirmationEmailAdvice">
<property name="mailSender"><ref local="mailSender"/></property>
</bean>
-->
<!-- Advisor encapsulating email advice -->
<!--
<bean id="emailAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<constructor-arg><ref local="emailAdvice"/></constructor-arg>
<property name="pattern"><value>.*insertOrder.*</value></property>
</bean>
-->
<!--
定义了一个事物管理
设置了相关的属性
-->
<bean id="petStore" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager"><ref bean="transactionManager"/></property>
<property name="target"><ref local="petStoreTarget"/></property>
<property name="transactionAttributes">
<props>
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
<!-- Uncomment the following in order to enable mail sending aspect -->
<!--
<property name="postInterceptors">
<list>
<ref local="emailAdvisor"/>
</list>
</property>
-->
</bean>
<!-- ========================= REMOTE EXPORTER DEFINITIONS ========================= -->
<!-- RMI exporter for the JPetStore OrderService -->
<!-- Commented out by default to avoid conflicts with EJB containers -->
<!--
<bean id="order-rmi" class="org.springframework.remoting.rmi.RmiServiceExporter">
<property name="service"><ref local="petStore"/></property>
<property name="serviceInterface">
<value>org.springframework.samples.jpetstore.domain.logic.OrderService</value>
</property>
<property name="serviceName"><value>order</value></property>
<property name="registryPort"><value>1099</value></property>
</bean>
-->
</beans>
- spring-jpetstore 学习整理(二)
- spring 学习jpetstore整理(-)
- spring JpetStore学习笔记(二)
- spring-jpetstore学习
- spring-jpetstore学习
- Spring JPetStore学习(一)配置JPetStore
- spring-jpetstore学习之(二)jpetstore 部署开发环境篇
- spring JpetStore学习笔记(一)
- spring JpetStore学习笔记(三)
- spring JpetStore学习笔记(四)
- spring-jpetstore学习之(一)jpetstore 安装篇
- jpetstore学习(二)使用maven调试jpetstore项目
- 学习Spring附带源码jpetstore安装配置
- Spring自带的JPetStore分析(二)
- 分析和学习Spring中的jpetstore用户管理
- 分析和学习Spring中的jpetstore用户管理
- 学习Spring 附带源码jpetstore 一 安装配置篇
- jpetstore 学习的好例子 struts+spring+hibernate
- C#源码学习之---异步读取文件
- 【c】c语言中逗号运算符和逗号表达式
- C#源码学习之---事件驱动异步文件操作
- 紫田蓝芒还有赢政
- 【c】C语言编程写的一个http下载程序
- spring-jpetstore 学习整理(二)
- 【js】由浅到深了解JavaScript类
- 浏览器地址的参数的处理
- 当gridview中没数据时显示表头
- IIS ASP不能运行 HTM可以运行的修复工具
- 【js】Javascript----文件操作
- 简单的rpg任务制作
- Yahoo! UI Library 的介绍
- C语言函数调用约定