I’m going through a Spring Microservices tutorial and it has the following line in it:
Most of the time I see this to startup a Spring Boot application:
This is the first time I have seen SpringApplicationBuilder. When should we use this in general?
In our application we have used
SpringApplicationBuilder in the
starter is an simple application which will start the actual application instances programatically.
The number of processes to be started and type of process web/standalone will be passed as an argument to
starter application, based on the arguments the application instances will be started. we have used
-w to start as web application for state management.
boolean isWeb = // options parser, parse -w
There is another way of doing the same
SpringApplication sp = new SpringApplication(SpringApplicationBuilder.class);
We can also customise banner, loggers with
read the doc for more usage