JSR250:Java的CommonAnnotations,2.3:@Resource方法必须是遵循标准JavaBeans约定的setter [英] JSR250: CommonAnnotations for Java, 2.3: @Resource methods must be setters that follow the standard JavaBeans convention
问题描述
我在这一行遇到问题:
@Resource
public void setMessageDrivenContext(MessageDrivenContext context) {
this.context = context;
}
消息为:
JSR250:Java的CommonAnnotations,2.3:
@Resource 方法必须是遵循标准JavaBeans约定的setter。
即属性的voidsetProperty(value)。
JSR250: CommonAnnotations for Java, 2.3: @Resource methods must be setters that follow the standard JavaBeans convention. i.e. void "setProperty( value)" for " property".
ProjGatewayBean.java / DocViewerEJB / src / main / java / com / tscdv / document / b / beans line 72注释问题
ProjGatewayBean.java /DocViewerEJB/src/main/java/com/tscdv/document/b/beans line 72 Annotation Problem
可能是什么问题,如何解决?
我已将编辑器从Rad 7.5升级到8并且maven 2到3.这只是在导入maven项目之后发生的,但我在任何pom文件上都没有错误。
I have upgraded editor from Rad 7.5 to 8 and maven 2 to 3. This happens just after importing the maven projects, but I have no errors on any pom files.
我有其他一些问题,其中包含两个可能相关的xml文件,分为新帖子:
I have some other issue with two xml files that might be related, separated into a new post:
错误:包含版本<的项目未知>部署描述符需要XMI格式绑定或扩展文件。 ibm-web-bnd.xml
推荐答案
重命名班级中的上下文属性messageDrivenContext并更改方法如下:
Rename the context attribute messageDrivenContext in your class and change your method as follow:
@Resource
public void setMessageDrivenContext(MessageDrivenContext context) {
this.messageDrivenContext = context;
}
问候。
这篇关于JSR250:Java的CommonAnnotations,2.3:@Resource方法必须是遵循标准JavaBeans约定的setter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!