Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4802

How to call another api from same app in spring boot

$
0
0

I have two RestControllers for user and Company.

  • CompanyController: fetch from and store company information to companies table using service and repo level.

  • UsersController : It is used to fetch and store users.

  • Relationship: Each user is associated with company(User hasOne company).

When new User get registered, we need to fetch company information by id and associate with user profile.

For this, I have one endpoint in CompanyController, named getCompanyInfo. I have to call that endpoint to fetch company data while saving user profile.

How to call another API from same app in Spring Boot?


Viewing all articles
Browse latest Browse all 4802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>