Spring Boot: Make Spring Framework Great Again

Many people have known Spring Boot , but when asked about it, I discovered that many of them do not really understand what Spring Boot is, and more importantly, do not know how great it is. This is a pity!

Spring Boot is a project developed by Pivotal Team (The Spring Team), with the idea of ​​making it easier to use Spring Framework . Let's review the super features that it brings:

Spring Boot does not need to run additional Web Server

This means you won't need to start Tomcat , Glassfish , or anything like that anymore. Now we just need to run the web application with the command.

The programmer will specify the main () function of the application by using the Annotation provided by Spring Boot .

Spring Boot helps Debug more convenient with IDE

For those who are using InteliJ IDE , NetBeans IDE , or most other commonly used IDEs today, Spring Boot will become extremely "high" because we can run applications using debug tools right inside IDE, you no longer need to debug the entire web server.

Deploy faster

Because you don't need to go to Tomcat or Glassfish anymore, everything is now repackaged and we just need to boot with a simple Java command, the time spent will be halved.

Everything is simplified

This is the "crazy" part of Spring Boot , you will not need web.xml or configuration files, security, … all now in a single java file.

The number of dependencies needed to write a simple HelloWorld application? The answer is also 1 note.

Configuring applications is easier with Spring Boot

No more web.xml , now we declare the beans, and how to configure the application? The answer is extremely simple, and friendly to Java programmers: use Annotation @Configuration and @Bean , leaving Spring to worry.

Uncover a very interesting fact:

Just put application.properties file into src / main / resources , Spring will automatically load the file and we can call out anytime throughout the application life cycle.

List of config properties please refer here .

If you are wondering about the configuration of the test environment as a type, and in the actual deployment environment is another type, I can now solve this problem by passing the parameter

Spring will load the application.properties file and then the application- {environment} .properties file automatically.

Say no to XML

After a very long time, we have now been completely freed from the damn XML with strict rules, complicated name-space, a terror for newbie.

All in all, Spring Boot will save your time

The word "time" here includes both things: execution speed and application development time. That is the most important reason that makes Spring Boot my first choice when starting any Spring project.

ITZone via techmaster

Share the news now