我有一个验证器组件:
@Component("passwordValidator")
@Scope("view")
public class PasswordValidator implements Validator {
private int maxPasswordLength;
}
我想从属性文件中设置属性maxPasswordLength
的值
我在使用依赖注入的构建时间或在validate方法或@PostConstrcut方法中的每次验证期间设置它时感到困惑?
答案 0 :(得分:0)
JSF 2.0和2.1在验证器中不尊重@ PostConstruct,@ Resource,@ Inject等。 JSF 2.2应该为此提供支持。