Spring Framework
Spring framework is an application framework and inversion of control container for the java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the framework doesn't impose any specific programming model, it has become popular in the Java community as an addition to, or even replacement for the Enterprise JavaBeans model. The Spring Framework is open source.
Ways to create spring application
- Use spring.io initializer
- Using an IDE and Maven sample project.
- Using spring tool suite.
- Using CLI
Why should we use spring framework?
- The dependency injection approach used in spring framework.
- It contains powerful database transaction management capabilities.
- It simplifies integration with other Java frameworks JPA/Hibernate ORM, Struts etc.
- It reduce the cost and development time of the application.
Spring Boot
What is Spring Boot?
Spring Boot is a project that is built on the top of the spring framework. It's provides and easier and faster way to set up, configure and run both simple and web based applications.
It's a spring module that provides the RAD (Rapid Application Development) feature to the spring framework. It's used to create a stand alone apring based applications.
Spring boot is the combination of Spring Framework and Embedded services.
Goals of Spring Boot
Main goal is reduce development, unit test and integration test time.
- Provides opinionated development approach.
- Avoid defining more annotation configuration.
- Avoid writing lots of import statements.
- Avoid XML configuration.
Advantages of Spring Boot
- It creates stand alone Spring applications that can be started using Java -jar
- It tests web applications easily with the help of different Embedded HTTP servers such as Tomcat, Jetty. It provides opinionated 'starter' POMs to simplify our maven configuration.
- It provides production-ready features.
- There is no requirement for XML configuration.
- It offers a CLI tool for developing and testing the Spring boot application.
- It offers the number of plugins.
- It minimize the writing multiple boilerplate codes, XML configurations and annotations.
- It increases productivity and reduce development time.
Spring Boot Features
- Web development
- Spring Application
- Application events and listeners
- Admin features
- Externalize configuration
- Properties files
- YAML support
- Type safe configuration
- Logging
- Security
References: https://www.javatpoint.com/spring-boot-tutorial
https://en.wikipedia.org/wiki/Spring_Framework
No comments:
Post a Comment