[英]NO setter property found in class Spring
I have a spring application and deploying in external tomcat
(version-8.0.0).Using STS
ide for development.我有一个 spring 应用程序并部署在外部
tomcat
(版本 8.0.0)中。使用STS
ide 进行开发。
applicationContext.xml applicationContext.xml
<bean id="Manager" class="com.data.managers.Manager" p:hostName="${hostName}"
p:userName="${username}" p:pWord="${password}">
</bean>
Manager Class经理 Class
public class Manager {
private String pWord;
public void setpWord(String pWord) {
this.pWord = pWord;
}
}
When i build the application, applicationContext file showing error当我构建应用程序时, applicationContext文件显示错误
No setter found for property 'pWord' in class com.data.managers.Manager
what was wrong here.这里出了什么问题。
Help me to solve this issue帮我解决这个问题
thanks in advance提前致谢
Getter and Setter for pWord
should be getPWord()
and setPWord()
. pWord
的 Getter 和 Setter 应该是getPWord()
和setPWord()
。 The first letter after set
and get
should be uppercase. set
和get
之后的第一个字母应该是大写的。
Better change the property to password
and getter setter to getPassword
and setPassword
最好将属性更改为
password
并将 getter setter 更改为getPassword
和setPassword
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.