I am making a project in spring security. I have 3 roles ROLE_USER, ROLE_COMPANY and ROLE_ADMIN. role admin will be defined in spring security itself. But other roles will be saved in database and when new user registers he will be allotted its respected role.
My problem is that i do not know how to save a new user in database in user and user_role table. should i make standard repository and service classes for user and user_roles. also i am unclear about inputting data when there is mapping in hibernate.
Just show me the steps to create new user by inputting data from client side like jsp page. Thank you.
Aucun commentaire:
Enregistrer un commentaire