0% found this document useful (0 votes)
4 views

Spring-Boot

Spring Boot is a framework built on the core Spring framework aimed at rapid application development, allowing developers to create production-grade applications with minimal effort. It simplifies the setup process by eliminating boilerplate code and XML configurations, and includes an embedded server for quick development and testing. Spring Boot also features starter templates that manage dependencies and provide a streamlined approach to integrating various functionalities into applications.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Spring-Boot

Spring Boot is a framework built on the core Spring framework aimed at rapid application development, allowing developers to create production-grade applications with minimal effort. It simplifies the setup process by eliminating boilerplate code and XML configurations, and includes an embedded server for quick development and testing. Spring Boot also features starter templates that manage dependencies and provide a streamlined approach to integrating various functionalities into applications.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Spring Boot

MARCH 20, 2019

CONFIDENTIAL 1
What Spring Boot is NOT?

• Its not an application or a web server.

• Does not implement any specific framework – ex: JPA or JMS

• Does not generate code.

CONFIDENTIAL 2
Spring Boot

• Spring Boot is a framework developed on top of core spring framework which


provides RAD (Rapid Application Development).

• The main aim of Spring Boot is to let developers to create spring production
grade applications and services with very less effort.

• What it takes to create real-time spring applications? It includes writing many


XML configurations, server setting, adding dependencies…etc. But with spring
Boot we can avoid all these boilerplate code, writing XML configurations and
annotations.

• We can create a real-time production ready applications with in minutes.

• Spring Boot comes with inbuilt server, we no longer have to use any external
servers like Tomcat, Glass-fish or anything else, so don’t need to deploy WAR
files
CONFIDENTIAL 3
Spring Boot

• It is highly dependent on the starter templates feature which is very


powerful and works flawlessly.

What is Starter Template?

• Spring Boot starters are templates that contain a collection of all the
relevant transitive dependencies that are needed to start a particular
functionality. For example, If you want to create a Spring WebMVC application
then in a traditional setup, you would have included all required dependencies
yourself. It leaves the chances of version conflict which ultimately result in
more runtime exceptions.

CONFIDENTIAL 4
Advantages of Spring Boot

• Spring boot helps in resolving dependency conflict. It identifies required


dependencies and import them for you.

• It has information of compatible version for all dependencies. It minimizes the


runtime classloader issues.

• It’s “opinionated defaults configuration” approach helps you in configuring most


important pieces behind the scene. Override them only when you need. Otherwise
everything just works, perfectly. It helps in avoiding boilerplate code, annotations
and XML configurations.

• It provides embedded HTTP server Tomcat so that you can develop and test quickly.

• It has excellent integration with IDEs like eclipse and intelliJ idea.

CONFIDENTIAL 5
@SpringBootApplication Annotation

This annotation is a shortcut of applying 3 annotations in one statement.

1. @SpringBootConfiguration: is new annotation in Spring boot 2. Previously, we


have been using @Configuration annotation. You can use @Configuration in place of
this. Both are same thing.
It indicates that a class provides Spring Boot application @Configuration. It simply means
that annotated class is a configuration class and shall be scanned for further configurations
and bean definitions.

2. @EnableAutoConfiguration: is used to enable auto-configuration of the Spring


Application Context, attempting to guess and configure beans that you are likely to need.
Auto-configuration classes are usually applied based on your classpath and what beans you
have defined.

3. @ComponentScan
CONFIDENTIAL 6
What is spring-boot-starter-parent dependency?

The spring-boot-starter-parent dependency is the parent POM providing


dependency and plugin management for Spring Boot-based
applications.
It contains the default versions of Java to use, the default versions of
dependencies that Spring Boot uses, and the default configuration of
the Maven plugins.

CONFIDENTIAL 7
Spring-boot-starter Maven Templates

Dependency management was becoming very complex task which


required good amount of technical expertise to do it correctly. With the
introduction of String boot starter templates, you can get a lot of help
in identifying the correct dependencies to use in project if you want to
use any popular library into your project.

Spring Boot comes with over 50+ different starter modules, which
provide ready-to-use integration libraries for many different
frameworks, such as database connections that are both relational and
NoSQL, web services, social network integration, monitoring libraries,
logging, template rendering, and the list just keeps going on

CONFIDENTIAL 8
Popular templates and their transitive dependencies

STARTER DEPENDENCIES
spring-boot-starter spring-boot, spring-context, spring-beans

jersey-container-servlet-core, jersey-container-servlet, jersey-


spring-boot-starter-jersey
server
spring-boot-starter-
spring-boot-actuator, micrometer-core
actuator
spring-boot-starter-aop spring-aop, aspectjrt, aspectjweaver
spring-boot-starter-data-
spring-hateoas, spring-data-rest-webmvc
rest
spring-boot-starter-hateoas spring-hateoas
spring-boot-starter-logging logback-classic, jcl-over-slf4j, jul-to-slf4j
spring-boot-starter-log4j2 log4j2, log4j-slf4j-impl
spring-boot-starter-security spring-security-web, spring-security-config

spring-test, spring-boot,junit,mockito, hamcrest-library, assertj,


spring-boot-starter-test
jsonassert, json-path

spring-boot-starter-web-
spring-ws-core
services
CONFIDENTIAL 9
References

https://docs.spring.io/spring-boot/docs/current/reference/html/

https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-propertie
s.html

CONFIDENTIAL 10

You might also like