Spring is the most popular and innovative community for the Java developers. They have changed the way how to build the enterprise applications and how to manage them.
It is a Spring module which provides RAD (Rapid Application Development) feature to Spring framework.
It is used to create stand alone spring based application that you can just run because it needs very little spring configuration.
WHY We Need Spring Boot?
Spring Boot is next generation attempt to easy spring setup.Spring Boot’s main benefit is configuring the resources based on what it finds in the classpath.- Ease the Java-based applications Development, Unit Test and Integration Test Process.
- Reduce Development, Unit Test and Integration Test time by providing some defaults.
- Increase Productivity.
Advantages of Spring Boot:
- Create stand-alone Spring applications that can be started using java -jar.
- Reduces lots of development time and increases productivity.
- Automatically configure Spring whenever possible.
- Provides lots of plugins to develop and test Spring Boot Applications very easily using Build Tools like Maven and Gradle.
- Embed Tomcat, Jetty or Undertow directly. You don’t need to deploy WAR files.
- It provides lots of plugins to work with embedded and in-memory Databases very easily.
- Absolutely no code generation and no requirement for XML configuration.
Spring Boot Features:
Web Development
Web Development is well suited Spring module for web application development. We can easily create a self-contained HTTP server using embedded Tomcat, Jetty or Undertow. We can use the spring-boot- starter-web module to start and running application quickly.
Application events and listeners
Always create factories file in META-INF folder like: META-INF/spring.factories
SpringApplication
SpringApplication is a class which provides the convenient way to bootstrap a spring application which can be started from main method. You can call start your application just by calling a static
0 1 2 3 4 |
public static void main(String[] args){ SpringApplication.run(className.class, args); } |
Externalized Configuration
Admin support
YAML Support
It provides convenient way for specifying hierarchical configuration. It is a superset of JSON. The SpringApplication class automatically support YAML. It is successful alternative of properties.
Properties Files
Logging
Type-safe Configuration
Strong type-safe configuration is provided to govern and validate the configuration of application. Application configuration is always a crucial task which should be type-safe. We can also use annotation provided by this library.
Looking great article feeling excited after getting such a nice information. Thank you