From 1b3228a671edc5fbd317e0a3183c81c721ec810b Mon Sep 17 00:00:00 2001 From: zhaoyang Date: Fri, 24 Oct 2014 17:55:24 +0800 Subject: [PATCH] Update PasswordHelper.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 已使用@value注入,造成了重复赋值,使用一种即可. --- .../zhangkaitao/shiro/chapter16/service/PasswordHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shiro-example-chapter16/src/main/java/com/github/zhangkaitao/shiro/chapter16/service/PasswordHelper.java b/shiro-example-chapter16/src/main/java/com/github/zhangkaitao/shiro/chapter16/service/PasswordHelper.java index c12cbbc9..04dfd4fc 100644 --- a/shiro-example-chapter16/src/main/java/com/github/zhangkaitao/shiro/chapter16/service/PasswordHelper.java +++ b/shiro-example-chapter16/src/main/java/com/github/zhangkaitao/shiro/chapter16/service/PasswordHelper.java @@ -19,9 +19,9 @@ public class PasswordHelper { private RandomNumberGenerator randomNumberGenerator = new SecureRandomNumberGenerator(); @Value("${password.algorithmName}") - private String algorithmName = "md5"; + private String algorithmName; @Value("${password.hashIterations}") - private int hashIterations = 2; + private int hashIterations; public void setRandomNumberGenerator(RandomNumberGenerator randomNumberGenerator) { this.randomNumberGenerator = randomNumberGenerator;