Spring


Table of Contents

Why Spring?

Spring is everywhere

Developers all over the world trust in Spring 's flexible libraries. Spring offers exciting services every day to millions of end-users - whether streaming TV, connected vehicles, shopping online, or countless other creative solutions. Spring also has contributions from all big technology names including Alibaba, Amazon , Google, Microsoft and more

Spring is flexible

The flexible and comprehensive set of Spring extensions and third-party libraries allow developers to build nearly any imaginable application. The Inversion of Control (IoC) and Dependency Injection (DI) features of Spring Framework provide the foundation for a wide range of features and functionalities at its core. Whether you are developing stable, reactive, web-based cloud-based microservices, or complex data streaming flows for the company, Spring has the tools to help.

Spring is productive

Spring Boot transforms the way you approach Java programming tasks, radically streamlining your experience. Spring Boot combines necessities like an application context and an auto-configured, embedded web server to make the development of microservices much easier. To go even quicker, you can mix Spring Boot with the wide range of libraries, servers, patterns, and templates supported by Spring Cloud to safely deploy all microservice-based architectures into the cloud, in record time.

Spring is fast

With Spring, you will notice fast startup, fast shutdown, and optimized execution by default. Spring projects are also increasingly supporting the reactive (non-blocking) programming model for even greater efficiency. The productivity of the developer is the Spring Superpower. Spring Boot helps developers build applications with ease and far less effort than other competing paradigms. Embedded web servers, auto-configuration, and "fat jars" help you get started quickly, and innovations like LiveReload in Spring DevTools mean that developers can run faster than ever before.

Spring is secure

Spring has a proven track record of addressing security issues quickly and responsibly. Spring committers are working with security professionals to patch and test any reported vulnerabilities. Third-party dependencies are also closely monitored, and regular updates are made to help keep your data and applications as secure as possible. In addition, Spring Security makes it easier for you to integrate with industry-standard security schemes and deliver reliable solutions that are secure by default.

Spring is supportive

The Spring community is large, global, diverse, and encompasses people of all ages and abilities, from beginners to skilled professionals. No matter where you are on your journey, you can find the support and resources you need to get you to the next level: quick start, guides & tutorials, videos, meetings, support, or even formal training and certification.

What Spring can do?

What Spring can do?

Spring Projects

There are a number of different Spring modules within the Spring Framework — MVC, AOP, JDBC, Beans, and Context. All Spring Modules share the same release as the Spring Framework version. They are part of a related project. There are other projects, other than the Spring Framework and its different modules, called Spring Projects. These projects offer solutions to other problems that enterprise applications face. These projects are distinct in version from the Spring Framework. The current version of the Spring Framework is, for example, 5.x.x and that of Spring Boot (one of the Spring Projects) is 2.x.x.

  • SPRING FRAMEWORK
  • SPRING BOOT
  • SPRING CLOUD
  • SPRING DATA
  • SPRING INTEGRATION
  • SPRING BATCH
  • SPRING SECURITY
  • SPRING HATEOAS
  • SPRING REST DOCS
  • SPRING AMQP
  • SPRING MOBILE
  • SPRING FOR ANDROID
  • SPRING WEB FLOW
  • SPRING WEB SERVICES
  • SPRING LDAP
  • SPRING SESSION
  • SPRING SHELL
  • SPRING FLO
  • SPRING KAFKA
  • SPRING STATEMACHINE
  • SPRING IO PLATFORM
  • SPRING SCALA
  • SPRING INTEGRATION
  • SPRING SOCIAL

Spring Framework Runtime

The Spring Framework consists of features organized into approximately 20 modules.

These modules are organized into:

  • Core Container
  • Data Access / Integration
  • Web
  • AOP (Aspect-Oriented Programming)
  • Instrumentation
  • Messaging
  • Test

as seen in the following diagram.

12-Factor App

The architectures of microservice are the 'new standard.' Building small, self-contained, ready-to-run applications can add flexibility and resilience to your code. Twelve-Factor App Methodology is suggested to developers to work seamlessly and produce applications with a focus on microservices.

1- Codebase

Each deployable app is tracked as one codebase tracked in revision control. It may have many deployed instances across multiple environments.

2- Dependencies

An app explicitly declares and isolates dependencies via appropriate tooling (e.g., Maven, Bundler, NPM) rather than depending on implicitly realized dependencies in its deployment environment.

3- Config

Configuration, or anything that is likely to differ between deployment environments (e.g., development, staging, production) is injected via operating system-level environment variables.

4- Backing services

Backing services, such as databases or message brokers, are treated as attached resources and consumed identically across all environments.

5- Build, release, run

The stages of building a deployable app artifact, combining that artifact with configuration, and starting one or more processes from that artifact/configuration combination, are strictly separated.

6- Processes

The app executes as one or more stateless processes (e.g., master/workers) that share nothing. Any necessary state is externalized to backing services (cache, object store, etc.).

7- Port binding

The app is self-contained and exports any/all services via port binding (including HTTP).

8- Concurrency

Concurrency is usually accomplished by scaling out app processes horizontally (though processes may also multiplex work via internally managed threads if desired).

9- Disposability

Robustness is maximized via processes that start up quickly and shut down gracefully. These aspects allow for rapid elastic scaling, deployment of changes, and recovery from crashes.

10- Dev/prod parity

Continuous delivery and deployment are enabled by keeping development, staging, and production environments as similar as possible.

11- Logs

Rather than managing logfiles, treat logs as event streams, allowing the execution environment to collect, aggregate, index, and analyze the events via centralized services.

12- Admin processes

Administrative or managements tasks, such as database migrations, are executed as one-off processes in environments identical to the app’s long-running processes.

Java EE vs Spring


CapabilityJava EESpring
Dependency InjectionCDI (Context and Dependency Injection)Spring IOC Container
AOPInterceptorSpring AOP and AspectJ
PersistenceJPASpring Data JPA, Spring JDBC, Spring ORM
MessagingJMSSpring JMS
Web FrameworkJSFSpring MVC
SecurityJava EE Security, EJBSpring Security
RESTJAX-RSSpring MVC REST
TransactionJTA, EJBJTA, Transaction Template