Tag: Spring Basics

Spring

Spring Bean Scopes

Introduction: Spring core container instantiates beans and manages their life-cycle. While defining a bean, we can provide its scope. Unless explicitly provided, singleton is the default scope of beans in a Spring container. We have five types of bean scopes available in Spring. In this tutorial, we’ll explore each of them. 1. singleton: The singleton […]

Be the First to comment. Read More
Spring

Spring Boot YAML Configuration

Introduction: In this quick tutorial, we’ll learn how to use a YAML file to configure properties of a Spring Boot application. What is YAML File? Instead of having an application.properties in Spring, we can use the application.yml as our configuration file. YAML is a superset of JSON and we can use it for configuring data. The […]

Be the First to comment. Read More
Spring

Spring ClassPathXmlApplicationContext

Introduction: Spring provides two types of containers: BeanFactory: It supports bean instantiating and wiring ApplicationContext: It extends the BeanFactory and so provides all those features as that a BeanFactory. Additionally, it provides automatic registration of BeanPostProcessor, internationalization, and many more features The Spring container is responsible for instantiating and managing the lifecycle of Spring beans. […]

Be the First to comment. Read More
Spring

Spring Dependency Injection

Introduction: In a well-designed Java application, the classes should be as independent as possible. Such a design promotes reusability of components. It also makes it easier to unit test the various components. The concept of dependency injection promotes loose coupling among Java objects. In this tutorial, we’ll talk about the dependency injection in Spring framework. […]

One comment Read More