The best practice in the spring, when to create a new user with custom attributes ... org to expand To create user or create user in .springframework.security.core User.DetailsService (this is the method taken in IceFace tutorial).
Public user delivery loadUserByUsername (String Username) Username Notfound Exception, Data Execution Execution {AppUser user = userDAO .findUser (username); If (user == faucet) new user name not throw exception exception ("user not found:" + username); Else {return makeUser (user); }} Private User Muxuser (App User User) {New user (user.tlogin ()), user .getPassword (), true, true, true, magratrat official (user)); }
If your user permissions are in the context of spring security user class, then just your It is ok to write your own user details
service but if your users have other features which are not included in the default user
category in the available fields, then you have to do both. Actually there is not a "best practice" - both are good options that really depend on your use case.
Comments
Post a Comment