SCOPE OF BEANS IN SPRING FRAMEWORK

Posted Posted in Uncategorized

In Spring every Bean is associated with a scope.When you make a getBean(“bean Id”) call spring container determines which bean to return using the scope of the bean.The default scope of every bean is singleton and there are total 4 types of scope of a bean. Types of scope of a bean: Singleton Prototype request […]

READING PROPERTY FILE IN SPRING FRAMEWORK

Posted Posted in Uncategorized

There will be times when you have to read property file for various reasons like reading database credentials like username, password, connection URL and much more.To do so spring provides a class called PropertySourcesPlaceholderConfigurer, using which you can read a property file content and use it into your application.Let’s implement an application in which we will learn how […]

Types of Dependency Injection in spring framework

Posted Posted in Uncategorized

Types of Dependency Injection in spring framework: There are basically two types of dependency injection which are – Setter Injection. Constructor Injection. There are generally three types of dependency which we inject: Dependent Object(Class object). String and int, long…etc(primitive types). Collections(List,Set,Map…etc). Here the “types of dependency which we inject” are basically the types of argument […]