Unable to find setter method for attribute: [commandName]
来源:互联网 发布:it专业 编辑:程序博客网 时间:2024/06/05 10:25
最近在学Spring mvc,在form表单的里面有个最重要的属性叫做commandName,用于自定义所要绑定的bean的名字。但是特别奇怪的一件事发生了,它居然要为commandName设置setter,很奇怪,因为这应该是直接赋值一个bean对象才对。
我的代码如下:
<form:form commandName="command" action="action" method="post"></form>
这个commandName就出错了。
改了一下午bug,找了诸多大佬,都没有最终解决该问题。最后,我不设置commandName了,因为如果不设置commandName的话会自动将样绑定的bean的名字设置为command,所以我删掉了commandName,将代码变成了如下
<form:form action="action" method="post"></form>
问题得解。
网上并无搜到任何相关原因,若有知道原因的大佬还烦请指点一二。
阅读全文
0 0
- Unable to find setter method for attribute: [commandName]
- 自定义标签 Unable to find setter method for attribute
- 关于自定义标签当中的unable to find setter method for attribute:xxx错误 小记
- 解决使用Struts2的s:textfield标签出现Unable to find setter method for attribute: style的问题
- Unable to find a result type for extension [...] in location attribute
- Unable to find AecbmapTagToEnum for enum AecbEnums...
- android databinding报错:cannot find the setter for attribute with parameter type
- unable to find method org.gradle.api.tasks.TaskInputs.file
- Unable to find method 'org.gradle.api.internal.file.DefaultSourceDirectorySet
- Solution for "De-serialization exception: Unable to find assembly xxxxx"
- Git出现fatal: Unable to find remote helper for 'https'
- Unable to Find Sources for Current Linux Kernel
- git clone: fatal: Unable to find remote helper for 'https'
- 使用CocoaPods过程中 Unable to find a specification for
- Unable to find app for caller android.app.ApplicationThreadProxy解决方案
- git 错误 fatal: Unable to find remote helper for 'https'
- git 错误: Unable to find remote helper for 'https'解决方法
- git 错误: Unable to find remote helper for 'https'解决方法
- PS之卡通徽章制作
- docker container DNS配置介绍和源码分析
- 链表倒序
- shell局部变量和全局变量
- js基本操作2
- Unable to find setter method for attribute: [commandName]
- Unity3D热更新之网页运行工具
- 你充满电了吗?——序(笔记)
- 【VS开发】vector<ImageFeatures> features(num_images)析构报错
- Hibernate 工具类(个人编写,初次了解,还未完善)
- PyQt5学习教程17:70行的货币转换程序的编程思路
- C++ 内存对齐
- JavaWeb项目启动时,自动执行代码的三种方式(包含不占用tomcat启动时长的方式)
- 蛋疼的一瞬间