Java Spring Tutorial_ Features, History, MVC Framework Architecture
Java Spring Tutorial_ Features, History, MVC Framework Architecture
(/images/1/081319_1354_JavaSpringT1.png)
/
In this tutorial, you will learn:
Ad
Predefined templates
Easy to test
Loose coupling
Lightweight
Fast development
Powerful abstraction
Offers an array of resources
Declarative support
Offers comprehensive tools
Spring framework was written by Rod Johnson and was first released in June 2002.
Spring last version release in March 2004
Spring 1.2.6 version release in 2006
Spring 2.0 version release in Oct 2006
Spring 2.5 version release in Nov 2007
Spring 3 version release in Dec 2009
/
Spring 3.1 version release in Dec 2011
Spring framework 4 version release in Dec 2013 with Java 8 support
Spring framework 4.2.0 version released on July 2015
Spring framework 4.2.1 version released in Sept 2015
Spring Framework 4.3 version released on 10 June 2016
Spring framework 5.0 version released on June 2017
(/images/1/081319_1354_JavaSpringT2.png)
The Core and Bean provide the fundamental part of the framework, including IoC and DI.
Core Container
The Core Container is further divided by subcomponents like Core, Beans, Context, and
Expression Language modules.
Spring Core: /
The Core module provides all the primary component of the spring framework. It includes
IoC (Inversion of Control) and Dependency Injection features.
Spring Bean:
This module offers BeanFactory, which is a sophisticated implementation of the factory
pattern.
Spring Context:
The Context module builds on the solid base provided by the Core and Beans modules, and
it is a medium which helps you to access any objects defined and configured.
This module offers expression language for modifying and querying object graph during the
runtime.
Data Access/Integration:
The Data Access and Integration layer consist of the JDBC, ORM, JDBC, OXM, JMS, and
Transaction modules.
ORM: ORM module offers consistency/ portability to code irrespective of data access
technologies. It will be based on object-oriented mapping concept.
The JDBC module consists of a JDBC-abstraction layer. It helps you elements the need to
perform JDBC related coding.
OXM: Object XML Mappers (OCM) helps you to convert the objects into XML format and
vice versa.
The Java Messaging Service module offers features like producing and consuming
messages.
Transaction: This module offers declarative and programmatic management method for
implementing unique interfaces and for all types of POJOs (Plain Old Java Object)
Spring Web:
Web: This module uses servlet listeners and a web-oriented application context. It also
offers a feature of web-oriented integration and functionality for multi-part file upload.
Web-servlet: This module stores MVC based implementation for web applications.
Web-Socket: Module offers WebSocket based and two-way communication between the
client and the server in web apps.
/
Web-Portlet: This module is also called Spring-MVC-Portlet module. It offers for Spring-
based Portlets and copies all the functionality of a Web-Servlet module.
AOP: AOP language is a useful tool which allows developers to add enterprise functionality
to the application.
Test: This module provides support for testing of Spring components with TestNG or JUnit
tools. It offers consistent loading of Spring ApplicationContexts and caching of those
contexts.
(/images/1/122118_0445_MVCTutorial1.png)
The MVC pattern allows you to separate different aspects of the application while offering
loose coupling between these elements. Spring MVC also helps you to build flexible and
loosely coupled web applications.
/
The MVC design also allows you to separate business logic, presentation logic, and
navigation logic. It also offers an elegant solution to use MVC in Spring Framework with the
help of DispatcherServlet.
(/images/1/081319_1354_JavaSpringT3.png)
Aspect-Oriented Programming
Aspect-oriented programming allows the global properties of a program to decide how it is
compiled into an executable program.
A cross-cutting concern may affect the entire application and is centralized in one location
in code like transaction security, management, logging, authentication, etc.
/
(/images/1/081319_1354_JavaSpringT4.png)
It can also be considered as a dynamic decorator design pattern. This pattern also offers an
additional behavior to be added to an existing class by wrapping the original class and
duplicating its interface and removing the original.
/
(/images/1/081319_1354_JavaSpringT5.png)
Aspect: An aspect is a class which allows implementing the JEE application. It concerns
which cut across multiple classes, like transaction management, security, etc.
Aspects can be a typical class configured using Spring XML configuration or a regular
class annotated using @Aspect annotation.
Step 2) Download Eclipse Neon installer and install it on your Windows system.
(/images/1/081319_1354_JavaSpringT6.png)
(/images/1/081319_1354_JavaSpringT7.png)
Step 4) Go to Eclipse IDE for Java Developers and click on "64-bit" link.
/
(/images/1/081319_1354_JavaSpringT8.png)
(/images/1/081319_1354_JavaSpringT9.png)
/
(/images/1/081319_1354_JavaSpringT10.png)
(/images/1/081319_1354_JavaSpringT11.png)
(/images/1/081319_1354_JavaSpringT13.png)
/
(/images/1/081319_1354_JavaSpringT14.png)
(/images/1/081319_1354_JavaSpringT15.png)
(/images/1/081319_1354_JavaSpringT16.png)
/
(/images/1/081319_1354_JavaSpringT17.png)
Step 13) Accepting terms and condition and installing the software.
1. Click on "I accept the terms of the license agreements" radio button.
2. Click on "Finish" button" to finish the installation.
/
(/images/1/081319_1354_JavaSpringT18.png)
/
(/images/1/081319_1354_JavaSpringT19.png)
Step 14) Click on "Restart Now" button to restart Eclipse IDE and apply the changes.
(/images/1/081319_1354_JavaSpringT20.png)
/
(/images/1/081319_1354_JavaSpringT21.png)
Summary: /
Spring framework is an easy to use open-source Java platform
Predefined templates and loose couple are important features of Java spring
Spring framework was written by Rod Johnson and was first released in June 2002
The Spring Framework provides 20 modules which can be used based on an application
requirement.
Java spring dispatcherServlet communicates with HandlerMapping. It also revokes
controller associated with that specific request.
Aspect-oriented programming allows the global properties of a program to decide how it
is compiled into an executable program.
The biggest advantage of Java Spring is that it allows developers to develop enterprise-
class applications with the help of POJOs
The biggest drawback of Java spring is that it offers too many restrictions.
/
(/generate-random-number- (/javascript-unit-testing- (/prime-number-program-
java.html) frameworks.html) java.html)
Java Tutorials
48) Split a String (/how-to-split-a-string-in-java.html)
(https://www.facebook.com/guru99com/)
(https://twitter.com/guru99com)
(https://www.linkedin.com/company/guru99/)
(https://www.youtube.com/channel/UC19i1XD6k88KqHlET8atqFQ)
(https://forms.aweber.com/form/46/724807646.htm)
About
About Us (/about-us.html)
Advertise with Us (/advertise-us.html)
Write For Us (/become-an-instructor.html)
Contact Us (/contact-us.html)
Career Suggestion
/
SAP Career Suggestion Tool (/best-sap-module.html)
Software Testing as a Career (/software-testing-career-
complete-guide.html)
Interesting
eBook (/ebook-pdf.html)
Blog (/blog/)
Quiz (/tests.html)
SAP eBook (/sap-ebook-pdf.html)
Execute online
Execute Java Online (/try-java-editor.html)
Execute Javascript (/execute-javascript-online.html)
Execute HTML (/execute-html-online.html)
Execute Python (/execute-python-online.html)
/
/