Reputation: 317
I have number of servers and database on each of them. I want to deploy Spring Boot application on each server to get information I need and gather all in presentation layer which would be in Angular.
How should I manage HTTP calls from Angular to Spring Boot ?
Is there any specific approach I should take ? Example would be great.
Upvotes: 0
Views: 155
Reputation: 871
You would follow the MVC pattern for each Spring Boot application you want to deploy on the servers. I recommend this tutorial.
Your Angular application would send HTTP requests for the corresponding SpringBoot application's endpoint (app1/getUsers) for example. Check here.
You can use the classic Servlet architecture with the synchronous blocking module of thread per request.
Or, you can use Spring's new Reactor stack for asynchronous handling of requests.
Check here for comparison.
Upvotes: 1