0

In my application, I have two types of users and they need to be authenticated from two different userDetailServices because their data exists in different tables. I am thinking to create different endpoints for these users. How can i invoke different userDetailService specific to different endpoints?

suraj bahl
  • 2,864
  • 6
  • 31
  • 42

1 Answers1

2

If both the tables are within the same database, a simple way to address the requirement is to retain a single userDetailService and service it through union (or union all) of the two tables in the query (or equivalent JPA style).

Gro
  • 1,613
  • 1
  • 13
  • 19