如何自定义Seam 3凭证?
有没有办法自定义seam 3凭证对象?
我需要向凭据(验证码)添加一项属性。我尝试了以下代码:
@Named("credentials") @SessionScoped
public class Credentials extends CredentialsImpl {
private static final long serialVersionUID = -4377742708407292709L;
private String captcha;
public String getCaptcha() {
return captcha;
}
public void setCaptcha(String captcha) {
this.captcha = captcha;
}
}
但它与 org.jboss.seam.security.CredentialsImpl @Named 注释有冲突。我如何覆盖凭据?
is there any way to customize seam 3 credentials object?
I need to add one more attribute to credentials (captcha). I tryed the following code:
@Named("credentials") @SessionScoped
public class Credentials extends CredentialsImpl {
private static final long serialVersionUID = -4377742708407292709L;
private String captcha;
public String getCaptcha() {
return captcha;
}
public void setCaptcha(String captcha) {
this.captcha = captcha;
}
}
But it has a conflict with org.jboss.seam.security.CredentialsImpl @Named annotation. How can i override the credentials?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试CDI 专业化。 IE :
Yould could try a CDI specialization. Ie :