Coding

Published on October 3rd, 2019 | by Sunit Nandi

0

How to learn Spring framework

Spring framework is one of the most popular Java frameworks.Spring is powerful framework which can solve common problem in Java EE.

If you want to learn spring framework, there are lot of projects for different purpose. Spring framework provides complete enterprise solution.

Let’s see steps to learn Spring framework

Learn Spring basics

If you just want to learn Spring basics, you can learn spring core. It is heart of spring framework and includes concepts like dependency injection, Aspect oriented programming(AOP), application context etc.You can refer spring tutorial to learn spring framework.

Spring framework projects

Spring core: It is core component of Spring framework. All other projects uses Spring core. It includes concepts such as dependency injection and applicatonContext

Spring MVC: Spring MVC is most used web application framework. It provides good interfaces to create web application.

Spring boot: It is most recent and promising spring project. It helps you to create Spring application in no time.

Spring security: Spring security can be used for applying security.

Spring JDBC: Spring JDBC helps you avoid lot of boilder plate code which you might have write with Java JDBC.

Understand dependency injection

Dependency injection is one of the core concept of Spring framework. Basic idea of dependency inject is that you do not create objects instead just describe how should be created.

Objects are given their dependencies at creation time by some external entity which takes care of each object in System

Some advantages of dependency injection

  • Dependencies can be easily identified
  • Can be tested easily
  • Ensure that configuration and use of services are separate
  • You can just switch implementation by changing the configuration.

Read books

You can grab a good spring books to learn Spring. I would highly recommend Spring in action to learn Spring framework.

Learn Spring boot

Spring boot has changed the way to bootstrap Spring application.Spring boot is a way which can help you bootstrap spring application quicky.

Spring boot helps you create spring application in no time. It comes with auto configurations which can help you avoid lot of boilerplate code.

For example:

You want to create Spring MVC hibernate application and you are confused with dependencies to include. You need to create DataSource, EntitymanagerFactory, TransactionManager etc beans. This is kind of default configuration to create Spring MVC hibernate application.

Create a sample Spring project

You can create a sample spring project using different components of Spring such as Spring boot, Spring data etc.

Spring boot takes care of all default configurations. It will create above beans as well for you. You can avoid lot of obvious code with the help of Spring boot,so it will save lot of time for you.

Follow latest Spring projects

Spring has introduced lot of Spring projects over time. You can follow latest spring development and use them in your projects.

Tags: , , , , ,


About the Author

Avatar photo

I'm the leader of Techno FAQ. Also an engineering college student with immense interest in science and technology. Other interests include literature, coin collecting, gardening and photography. Always wish to live life like there's no tomorrow.



Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top ↑