Spring Framework Tutorial

📘 Premium Read: Access my best content on Medium member-only articles — deep dives into Java, Spring Boot, Microservices, backend architecture, interview preparation, career advice, and industry-standard best practices.

🎓 Top 15 Udemy Courses (80-90% Discount): My Udemy Courses - Ramesh Fadatare — All my Udemy courses are real-time and project oriented courses.

▶️ Subscribe to My YouTube Channel (176K+ subscribers): Java Guides on YouTube

▶️ For AI, ChatGPT, Web, Tech, and Generative AI, subscribe to another channel: Ramesh Fadatare on YouTube

Spring is an enterprise Java framework. It was designed to simplify Java EE development and make developers more productive. Spring makes use of Inversion of Control and Dependency Injection to promote good software coding practices and speed up development time.

This tutorial covers Spring Core, Annotations, All Java Spring Configuration, Spring AOP, Spring MVC, Spring Security, Spring REST, Spring Boot and Spring Data JPA.

Spring Core

Spring IOC Container

  • Spring IOC Container Overview - In this article, we will discuss what Spring IOC container, how it works, how to create Spring IOC container, how to retrieve beans from Spring IOC container with examples.
  • BeanFactory vs ApplicationContext in Spring - In this short article, we will quickly discuss the difference between the BeanFactory and ApplicationContextcontainer levels and the implications of bootstrapping.

Spring Dependency Injection

  • Guide to Dependency Injection in Spring - This guide provides what is dependency injection in Spring framework and what are different types of dependency injection supports in Spring with examples (constructor and setter method).
  • Spring - @DependsOn Annotation Example - In this article, we will discuss how to use @DependsOn annotation in Spring Applications with an example. The @DependsOn annotation can force Spring IoC container to initialize one or more beans before the bean which is annotated by @DependsOn annotation.

Spring Bean Scopes

Annotation-based Container Configuration

Java-based Container Configuration

  • Spring Java Based Configuration Basics -In this article, we will briefly look into the basics of Spring Java-based container configuration.
  • Spring Java Based Configuration Example - In this post, we will demonstrate the usage of Spring Java-based container configuration.
  • Spring @Bean Annotation with Example - In this article, we will discuss Spring Java configuration based @Bean annotation with examples. We will also discuss different scenarios of how and when to use @Bean annotation.
  • Spring @Configuration Annotation with Example - In this article, we will discuss a very important Spring Java-based configuration annotation that is a @Configuration annotation with examples.
  • Spring @PropertySource Annotation with Example - In Spring, you can use @PropertySource annotation to externalize your configuration to a properties file. In this article, we will discuss how to use @PropertySource to read a properties file and display the values with @Value and Environment.
  • Spring @Import Annotation with Example - In this article, we will discuss how to use Spring @Import annotation with examples.
  • Spring @ImportResource Annotation Example - In this article, we will quickly discuss how to use @ImportResource annotation with a simple Spring boot application.
  • Spring - @Lazy Annotation Example - In this quick article, we’ll discuss Spring’s @Lazy annotation with an example. By default, the Spring IoC container creates and initializes all singleton beans at the time of application startup. We can prevent this pre-initialization of a singleton bean by using the @Lazy annotation.
  • 15 Spring Core Annotations - In this quick article, we will discuss Spring core annotations that are used in Spring DI and Spring IOC.

Spring MVC

Spring MVC Getting Started/Basics

  • Spring MVC 5 - Hello World Example - In this article, we will learn how to create a simple Hello World Spring MVC Application using Spring MVC 5 +, JSP, Maven build tool and Eclipse IDE
  • Spring MVC 5 - Sign Up Form Handling Example - In this article, we will learn how to create and submit a simple form (signup form) in Spring MVC application using Spring MVC 5+, Maven build tool, JSP and Eclipse IDE or STS.
  • Spring MVC JSP Form Tags Tutorial - In this tutorial, we're going discuss all Spring MVC form tags and we will use important spring MVC form tags such as form tag, text fields tag, select tag, check-box(s), radio box(s), password tag, button tag, errors tag, etc.

Spring MVC 5 and Hibernate 5 Integration

Spring MVC + Spring Boot Articles

  • Spring Boot 2 - Spring MVC + Thymeleaf Input Form Validation - In this quick article, we will discuss the process of configuring a web application form to support validation. We will use the latest Spring boot 2.0.5 RELEASE, Hibernate validator with Thymeleaf to develop simple Spring MVC web application. We get Hibernate Validator for free when we use Spring Boot Starter Web.

Spring MVC + Spring Boot  + Spring Security

Spring MVC and Spring Bean Annotations

  • Spring @RequestBody and @ResponseBody Annotations - In this quick article, we will discuss usage Spring @RequestBody and @ResponseBody annotations with examples.@RequestBody and @ResponseBody annotations are used to bind the HTTP request/response body with a domain object in method parameter or return type. Behind the scenes, these annotation uses HTTP Message converters to convert the body of HTTP request/response to domain objects.
  • Spring @Service Annotation - In this quick article, we will discuss how to use @Service annotation in Spring-based applications.

Spring MVC + Spring Boot Mini Projects

This tutorial describes how you can create JPA repositories without writing any boilerplate code, and it consists of the following blog posts.
  • Spring Data JPA Tutorial - Getting Started - This article provides a quick introduction to Spring Data JPA. It also describes all the important interfaces of Spring data commons and Spring Data JPA - Repository, CrudRepository, PagingAndSortingRepository, QueryDslPredicateExecutor, JpaRepository, JpaSpecificationExecutor
  • Spring Data JPA - Query Creation from Method Names - In this article, we will learn how we can create query methods by using the query generation from the method name strategy. We will demonstrate this with a complete end-to-end example using Spring boot.
  • Spring Data JPA - Auditing with Spring Boot 2 and MySQL Example - In this article, we will discuss how can we configure JPA to automatically persist the CreatedByCreatedDateLastModifiedBy, and LastModifiedDate columns for any entity. We will create a simple Spring Boot CRUD REST APIs and we implement auditing using spring data JPA.
  • Spring Data JPA - Working with Multiple Datasources using Spring Boot -  In this article, we will learn how to configure multiple data sources and connect to multiple databases in a typical Spring Boot web application. We will use Spring Boot, JPA, Hibernate 5, Thymeleaf and H2 database to build a simple Spring Boot multiple data sources web application.
  • Spring Data Java 8 Support - Spring Data now supports core Java 8 features – such as Optional, Stream API and CompletableFuture. In this quick article, we’ll go through some examples of how we can use these with the framework.
  • Spring Data Annotations - In this tutorial, we’ll see the most common annotations of the Spring Data, Spring Data JPA, and Spring Data MongoDB projects.
  • Spring @Repository Annotation - In this quick article, we will discuss how to use @Repository annotation in Spring-based applications. DAO or Repository classes usually represent the database access layer in an application and should be annotated with @Repository.

Spring Boot Tutorial

Learn and master in Spring boot at https://www.javaguides.net/p/spring-boot-tutorial.html.

Comments

Spring Boot 3 Paid Course Published for Free
on my Java Guides YouTube Channel

Subscribe to my YouTube Channel (165K+ subscribers):
Java Guides Channel

Top 10 My Udemy Courses with Huge Discount:
Udemy Courses - Ramesh Fadatare