houbb/sensitive

自定义注解策略类,加密类注入不了

voroq opened this issue · 1 comments

voroq commented

请问,这种自定义策略类,想用StringEncryptor ,该怎么注入呢?
`
public class CustomPasswordStrategy implements IStrategy {
@Autowired
private StringEncryptor stringEncryptor;

@Override
public Object des(Object original, IContext context) {
    String encryptStr = stringEncryptor.decrypt(ObjectUtil.objectToString(original));
    return encryptStr;
}

}
`

houbb commented