WELD-000075: Normal scoped managed bean implementation class has a public field:
[EnhancedAnnotatedFieldImpl] public nis.spro.seisan.domain.master.mente.shodonjoken2.SczsprnwServiceImpl.fc
com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.exception.RuntimeError: com.ibm.ws.exception.RuntimeError:
java.lang.RuntimeException: com.ibm.ws.cdi.CDIRuntimeException: com.ibm.ws.cdi.CDIDeploymentRuntimeException: org.jboss.weld.exceptions.DefinitionException:
WELD-000075: Normal scoped managed bean implementation class has a public field:
[EnhancedAnnotatedFieldImpl] public nis.spro.seisan.domain.master.mente.shodonjoken2.SczsprnwServiceImpl.fc
普通作用域的托管bean实现类有一个public字段
[增强注释字段]
public FlowControlImpl fc = new FlowControlImpl();
If a managed bean has a public field, it must have scope @Dependent.
If a managed bean with a public field declares any scope other than @Dependent,
the container automatically detects the problem and treats it as a definition error.
如果托管bean有一个public字段,那么它的作用域(范围Scope)必须用’@Dependent’注解。
如果带有public字段(属性)的托管bean声明了除@Dependent以外的任何作用域,则容器会自动检测问题并将其视为’定义错误’。
解决办法: 把’@RequestScope’换成’@Dependent’
常用注解有:
包路径javax.enterprise.context.
@RequestScoped
@SessionScope
@ApplicationScoped
@Dependent
参考:https://codingdict.com/sources/java/javax.enterprise.context.html