You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run this example with quoters running locally as well - as suggested in "Fetching a REST Resource". The (consumer) application failed to start due to Web server failed to start. Port 8080 was already in use.
IMHO there is no reason why this consumer application should fire up a web server.
Thus the solution for me was to change the main method to
new SpringApplicationBuilder(GsConsumingRestApplication.class)
.web(WebApplicationType.NONE) // .REACTIVE, .SERVLET
.run(args);
Would it be okay to include this in the repo?
The text was updated successfully, but these errors were encountered:
Alternatively, you could change the spring-boot-starter-web dependency to spring-boot-starter-json. This includes all the dependencies needed for the consuming app, but doesn't add a web server to the classpath.
I tried to run this example with quoters running locally as well - as suggested in "Fetching a REST Resource". The (consumer) application failed to start due to Web server failed to start. Port 8080 was already in use.
IMHO there is no reason why this consumer application should fire up a web server.
Thus the solution for me was to change the main method to
new SpringApplicationBuilder(GsConsumingRestApplication.class)
.web(WebApplicationType.NONE) // .REACTIVE, .SERVLET
.run(args);
Would it be okay to include this in the repo?
I would welcome that change as a PR. You are correct that there's no reason to fire up a web server for this application, and the reactive approach is a good way to avoid that unnecessary overhead.
I'm adding the good first issue label, in case someone wants to use it as their first contribution to Spring.
Alternatively, you could change the spring-boot-starter-web dependency to spring-boot-starter-json. This includes all the dependencies needed for the consuming app, but doesn't add a web server to the classpath.
You are right. However, the solution proposed in the initial comment is better, because it removes the unnecessary overhead of starting a web server.
I tried to run this example with quoters running locally as well - as suggested in "Fetching a REST Resource". The (consumer) application failed to start due to
Web server failed to start. Port 8080 was already in use.
IMHO there is no reason why this consumer application should fire up a web server.
Thus the solution for me was to change the main method to
Would it be okay to include this in the repo?
The text was updated successfully, but these errors were encountered: