---
title: "绊脚石"
author: "Riancy007"
date: "2007-11-08T17:06:44Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2007-11-08T17:06:44Z"
id: 139268
url: "https://riancy007.iteye.com/blog/139268"
---

需要注意的问题：
事务包裹：

要在配置文件中对方法进行包裹。
比如在applicationContext.xml中

<bean id="procCheckService" parent="txProxyTemplate">
		<property name="target">
			<bean class="com.spaceon.qmis2007.service.imp.ProcCheckServiceImp" singleton="false">
				<property name="q3MonitoridsetDao" ref="q3MonitoridsetDao" />
				<property name="q3ProcessSetDao" ref="q3ProcessSetDao" />
				</bean>
		</property>
		<property name="transactionAttributes">
			<props>
				<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
				<prop key="add*">PROPAGATION_REQUIRED</prop>
				<prop key="delete*">PROPAGATION_REQUIRED</prop>
				<prop key="update*">PROPAGATION_REQUIRED</prop>
			</props>
		</property>
	</bean>



2。spring的绑定问题
可以将客户端的输入的数据与Form绑定，在服务器端通过Form对象的get方法获得其值。
也可以把在服务器端通过Form对象的set方法设定其值，并通过类似
ModelAndView mav = new ModelAndView("processView","<span style="color:red">processSetForm</span>",processSetForm);
		return mav;
把form传递到JSP页面，在JSP页面中通过设定
<spring:form name="processSetForm" commandName="<span style="color:red">processSetForm</span>".........>
注意红色的部分一定要相同。

和
<spring:input path="propertyNm">来显示form的属性值。