0

I am creating a web app in Angular2 using nodejs. I have a dependency project in Java that will provide me some data. I am trying to connect the bridge using Springboot. Is there a way to get data from the Java framework using SpringBoot to Angular2 NodeJS?

Thank you

1 Answer 1

1

If you are trying to access data directly from your spring boot application to your angular application then you can make use of angular http library. If your question is that you want to first make server call to your node server(from your angular application) and then to your spring boot application (from your node application) then you can use npm library like axios to make http request from one server to another.Here is the link to that library https://www.npmjs.com/package/axios

Sign up to request clarification or add additional context in comments.

2 Comments

Hey Karan, Thanks for the quick response. My aim is for both the frontend Angular2 project and the backend springboot project to be in the same server. Will there be any issues with making the requests?
no even thing will be more easier for u.since you are on the same server you dont have to write the full url while making http requests from your front end. So you can just write http.get('user') If you have defined /user as the request mapping in your spring boot controller.So /user controller will be called and yu can process the request and return a json response and then can consume that json response in your angular application

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.