With spring security plugin,how can i delete password from bootstrap after first run and make it then after accessible from database?
I am using spring security plugin in my app.i fallowed steps in its tutorial and its running successfully,
After first run encoded password of password given in bootstrap while creating new user will get stored in database table..So when now Admin logs out i want password should get delete from bo开发者_StackOverflow社区otstrap and it should be accessed from database encoded one for next login of Admin.
How can i do that?
Advance Thanks, Laxmi.P
You should write your bootstrap code so that the data only gets written if it needs to.
def user = User.findByUsername('admin')
if (!user) {
// create admin user
}
Aside from that, when any user logs into the system it will use what is in the database because whatever you write to the database in bootstrap is, well, in the database. Sounds to me like you think that the user is accessing bootstrap directly, but that doesn't happen, and wouldn't make sense anyway.
精彩评论