spring-guides / gs-consuming-rest

Consuming a RESTful Web Service :: Learn how to retrieve web page data with Spring's RestTemplate.
https://spring.io/guides/gs/consuming-rest/
Apache License 2.0
195 stars 287 forks source link

Remove web dependency that can cause problems running the example #54

Closed bwalshe closed 1 year ago

bwalshe commented 1 year ago

If someone has the quotes server running on localhost:8080, and they try and run the rest-consuming example app, then it will fail as currently the app tries to start its own server on 8080, which is already occupied by the quotes server.

Switching from spring-boot-starter-web dependency to spring-boot-starter-json prevents the consuming app from trying to start a server of its own.

An alternative way to fix this problem would be to change how the app is initialized as suggested here This would require some explanation in the readme, but it might be a more educational fix than the one I am suggesting.

pivotal-cla commented 1 year ago

@bwalshe Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

bwalshe commented 1 year ago

@pivotal-cla This is an Obvious Fix

pivotal-cla commented 1 year ago

@bwalshe This Pull Request contains an obvious fix. Signing the Contributor License Agreement is not necessary.

Buzzardo commented 1 year ago

Closing this for the reasons mentioned in https://github.com/spring-guides/gs-consuming-rest/issues/52

We appreciate the contribution, though.