【问题】Cannot find any information on property 'userPhone' in a bean of type 'Bean'.
2013-05-02 10:35
543 查看
问题出现:
由于上课不听课,书本也不仔细看,代码总是反复利用一些敲过的
在修改过程中就出现了这个问题,一开始,很不理解,usebean 没有
用错,为什么javabean 里的属性老是调不出来呢,反复检查再三,
反复看书。
解决方案:
课本上有句,如果类的成员变量的名称是xxx,那么为了更改或获取变量成员的值,即更改或
获取属性的值,在类中必须提供两种方法,
* getXXX,用来获取属性
*setXXX ,用来修改属性
举例:
属性为name那么
方法必须是getName或setName
若随便写成getPname等不一样的,均会出现此报错信息
由于上课不听课,书本也不仔细看,代码总是反复利用一些敲过的
在修改过程中就出现了这个问题,一开始,很不理解,usebean 没有
用错,为什么javabean 里的属性老是调不出来呢,反复检查再三,
反复看书。
解决方案:
课本上有句,如果类的成员变量的名称是xxx,那么为了更改或获取变量成员的值,即更改或
获取属性的值,在类中必须提供两种方法,
* getXXX,用来获取属性
*setXXX ,用来修改属性
举例:
属性为name那么
方法必须是getName或setName
若随便写成getPname等不一样的,均会出现此报错信息
相关文章推荐
- Cannot find any information on property 'User' in a bean of type 'com.entity.user'
- 异常处理_Cannot find any information on property 'XXX' in a bean of type 'XXX'
- Cannot find any information on property 'S' in a bean of type 'beans.Circle'
- javaweb开发常见错误Cannot find any information on property 'XXX' in a bean of type 'XXX'
- Cannot find any information on property [datetime] in a bean of type
- Javabean error: Cannot find any information on property
- Cannot find any information on property问题
- Cannot find bean: "org.apache.struts.taglib.html.BEAN" in any scope 问题
- Cannot find bean userinfo in any scope
- Struts中Cannot find bean XXX in any scope的问题
- vuejs路由使用的问题Error in render function: "TypeError: Cannot read property 'matched' of undefined"
- 【spring-security】 Property or field 'ROLE_USER' cannot be found on object of type 'org.springframewo
- Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
- Property or field 'str' cannot be found on object of type 'com.yubai.EL.DemoService' - maybe not pub
- vue项目中Error in render function: "TypeError: Cannot read property 'matched' of undefined"
- Cannot find bean org.apache.struts.taglib.html.BEAN in any scope异常解决方案
- mongoDB add user in v3.0 问题的解决(Property 'addUser' of object admin is not a func)
- spring同时使用aop和spel表达式出错:Property or field 'instrument' cannot be found on object of type 'com.sun.pr
- Consider defining a bean of type 'app.mapper.UserMapper' in your configuration.
- spring同时使用aop和spel表达式出错:Property or field 'instrument' cannot be found on object of type 'com.sun.pr