Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我这样做时,<form:errors path="*"/>我的错误总是以随机顺序显示。现在我想知道如何按固定顺序显示它们。
<form:errors path="*"/>
我的意思是随机是:字段:字段1,字段2,字段3输出1:字段2,字段1,字段3输出2:字段3,字段2,字段1 ...
这不完全适合您的问题。如果您指定所需的路径值而不是“*”,则可以对错误进行排序。例如,
<form:errors path="field1"/> <form:errors path="field2"/> <form:errors path="field3"/>