0

Can anyone help me configuring my Spring boot web app to access or have login from 2 different MySQL tables?

App should login access from 2 different MySQL tables(users and admins). Upon login, they should be redirected to their respective dashboards.

For now, I am able to configure my web app to access user details from users table, unable to access admin table for login.

itsHoney
  • 1
  • 1
  • it's going to be your help - https://stackoverflow.com/questions/30337582/spring-boot-configure-and-use-two-datasources – Joonseo Lee Jun 07 '22 at 00:55
  • Really appreciate your effort. However I have only 1 database. Just the tables are different. User and Admin table. I got the solution of using 2 security config files, with annotation of order (1) & (2) will that be ok? – itsHoney Jun 07 '22 at 04:34
  • for example, do you want to use the same entity by two accounts? – Joonseo Lee Jun 07 '22 at 04:51
  • No. I have 2 different entities, User and Admin. both will have 2 different login pages. /userlogin and /adminlogin – itsHoney Jun 11 '22 at 23:02

0 Answers0