Upgrade codes, add comments

0.2
lishengzhao 2014-07-30 11:05:15 +08:00
parent 2e71e5adec
commit 131ee2b249
4 changed files with 18 additions and 4 deletions

View File

@ -26,6 +26,12 @@ public class WdcyUserDetails implements UserDetails {
this.user = user;
}
/**
* Note: please change the codes in this method , make it is much more available .
* Just for test of current implements.
*
* @return Collection of GrantedAuthority
*/
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
return Arrays.asList(DEFAULT_USER_ROLE, new SimpleGrantedAuthority(ROLE_PREFIX + "UNITY"), new SimpleGrantedAuthority(ROLE_PREFIX + "MOBILE"));

View File

@ -8,6 +8,12 @@ import java.util.Date;
public abstract class DateUtils {
/**
* Private constructor
*/
private DateUtils() {
}
public static Date now() {
return new Date();
}

View File

@ -8,6 +8,12 @@ import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
public abstract class PasswordHandler {
/**
* Private constructor
*/
private PasswordHandler() {
}
/**
* Encrypt password ,if original password is empty,
*

View File

@ -17,10 +17,6 @@
<result property="username" column="username"/>
<result property="lastLoginTime" column="last_login_time"/>
<!--<discriminator column="type_" javaType="String">-->
<!--<case value="Developer"-->
<!--resultMap="com.andaily.infrastructure.mybatis.user.DeveloperRepositoryMyBatis.developerMap"/>-->
<!--</discriminator>-->
</resultMap>