Spring Boot quite gets away all these anxieties and allows you to write the code which implies that is application code. Each feature of the Spring Boot which I noticed Example. auto-configuration, Starter POMs or Starter dependency and Spring Boot CLI proposes to analyze Java development with Spring.
Instantly, let's operate into a slight bit more details on an individual of certain features:
During a modern-day Spring application, which applies Java-based configuration, you need to combine the following two methods into your Configuration class:
@EnableAutoConfiguration or @SpringBootApplication annotation proceeding to Configuration class. I commonly annotated the Main class, which I am continuing to run with an set Tomcat server.
While AutoConfiguration brings away the effort of configuring common functionalities, the Starter POMs take away the effort by finding and combining common dependencies in your project.
To build a simplistic Spring MVC based REST application which supports Jackson and to run it an embedded container, you would at least want following dependencies Example:
By applying Spring Boot Starter POMs or starter dependency feature, you can perceive all of these by just appending spring-boot-starter-web dependency in your pom.xml
So, instead of appending all these dependencies and suffering about their compatible version, you just require to attach one. You wish also to be more confident that analyzed and tested versions of libraries are used. there won't be some incompatibility issues in the future.
While auto-configuration and starter dependencies are a primary focus on Spring Boot, Spring CLI is an optional one, you also require to install Spring CLI to use it.
Here is a simplistic "HelloWorld" RESTful Web Service in Groovy and Spring Boot CLI and it works you can only run even externally compiling as shown below:
Done, you can run this on an embedded container that appears including Spring Boot CLI, no web.xml, no configuration, and no server setup.
The actuator is another remarkable feature of Spring Boot which enables seeing what's performing on inside a running Spring Boot application. Among all its goodness of auto-configuration, there comes a risk of not knowing what is inside your application and that risk is addressed by Spring Actuator.
It gives a lot of insights and metrics of a running application in production. For example, by applying Actuator you can get out exactly which beans are configured in the Application context, whatever are auto-configuration decisions made, whichever environment variables, system properties, command-line arguments are available to an application including many more.
Spring Initializer is another feature of Spring Boot which resolves the problem concerning the project structure. Such a web application that enables yourself to create a Maven or Gradle project with Java, Kotlin or Groovy including Spring Boot.
All you require to define is to provide Project MetaData in GUI Example: name of your project, Group, Artifact, etc. It also enables you to choose a starter dependency from a big list Example: web, JPA, or security starter.
Once you build a project you can download the Zip file also next to open into an IDE like Eclipse or IntelliJ IDEA as described in Spring Boot.
Thanks.