我用Java Web窗体编写了一个简单的程序,但收到以下错误:
WELD-000072声明钝化作用域的托管bean必须具有钝化能力。Bean:
BeanPakage.DemoBeans
具有限定符[@Any
@Default
@Named
]的托管Bean [class ]
谁能告诉我这个错误来自哪里?
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
@Named("DemoBeans")
@SessionScoped
public class DemoBeans {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
@Interceptors
是我的问题!