Forms modelAttribute和commandName之间的差异

Forms modelAttribute和commandName之间的差异,forms,spring,spring-mvc,jstl,Forms,Spring,Spring Mvc,Jstl,发送表单数据时使用commandName和modelAttribute有什么区别 <form:form method="post" modelAttribute="csvFileUploadVO"> 及 我应该在哪个时间点使用它们?没有区别,由于历史原因存在两种不同的属性。True,在代码中,在FormTag中有public void setCommandName(String commandName){this.modeldattribute=commandName;}请

发送表单数据时使用commandName和modelAttribute有什么区别

<form:form method="post" modelAttribute="csvFileUploadVO">



我应该在哪个时间点使用它们?

没有区别,由于历史原因存在两种不同的属性。

True,在代码中,在
FormTag
中有
public void setCommandName(String commandName){this.modeldattribute=commandName;}
请参考此链接,它将为您提供详细信息
<form:form method="post" commandName="csvFileUploadVO">