Category Archives: Spring Framework

Spring with Jdbc java based configuration example

In this post, We will learn about Spring with Jdbc java based configuration example using a Demo Project. Spring Framework provides easy integration with JDBC API and provides org.springframework.jdbc.core.JdbcTemplate utility class that we can use to avoid writing boiler-plate code from our database operations logic such as Opening/Closing Connection, ResultSet, PreparedStatement, etc. Let’s have a… Read More »

Spring JDBC Annotation Example

In this post, We will learn about Spring JDBC Annotation Example using a Demo Project. Spring Framework provides easy integration with JDBC API and provides org.springframework.jdbc.core.JdbcTemplate utility class that we can use to avoid writing boiler-plate code from our database operations logic such as Opening/Closing Connection, ResultSet, PreparedStatement, etc. Let’s have a look at a… Read More »

Spring JDBC Integration Example

In this post, We will learn about Spring JDBC Integration Example using a Demo Project. Spring Framework provides easy integration with JDBC API and provides org.springframework.jdbc.core.JdbcTemplate utility class that we can use to avoid writing boiler-plate code from our database operations logic such as Opening/Closing Connection, ResultSet, PreparedStatement, etc. Let’s have a look at a… Read More »

getBean() overloaded methods in Spring Framework

In this post, We will learn about the getBean() overloaded methods in Spring Framework Example using a Demo Project. Spring BeanFactory has the following five getBean() Overloaded methods: Object getBean(String name) throws BeansException; <T> T getBean(Class<T> requiredType) throws BeansException; <T> T getBean(Class<T> requiredType, Object… args) throws BeansException; <T> T getBean(String name, Class<T> requiredType) throws BeansException;… Read More »

Spring JSR-250 Annotations with Example

In this post, We will learn about the Spring JSR-250 Annotations with Examples using a Demo Project. Spring Framework also supports JSR-250 annotations that include @Resource, @PostConstruct, and @PreDestroy annotations. These annotations are not really required because We already have other alternates or options to achieve  the same functionalities that we achieve using these annotations @Resource… Read More »

Spring bean scopes with example

In this post, We will learn about the Spring bean scopes with example using a Demo Project. In the Spring framework, we can create Spring beans in 6 inbuilt bean scopes and We can also create our custom bean scope as well. Out of these six bean scopes, four scopes are available only if We use a web-aware ApplicationContext.  singleton and prototype scopes… Read More »

Spring BeanPostProcessor Example

In this post, We will learn about the Spring BeanPostProcessor Example example using a Demo Project. A bean post-processor helps us to customize new bean instances created by the spring Container. If We want to implement some kind of custom logic just after the Spring container finishes instantiating, configuring, and initializing a bean then we usually plug… Read More »

Spring Bean Definition Inheritance Example

In this post, We will learn about the Spring Bean Definition Inheritance Example using a Demo Project. A child bean definition can inherit configuration data from a parent definition. The child definition can also override some properties or add others as needed. Spring Framework Bean’s definition of inheritance has nothing to do with Java class… Read More »

Injecting Collections in Spring Framework Example

In this post, We will learn about the Injecting Collections in Spring Framework Example using a Demo Project. Here We will learn How to  Inject List, Set, Map, Properties, and array. We have already seen how to configure primitive data type using value attribute and object references using ref attribute of the <property> and <constructor-arg> tags in our  Spring… Read More »

Spring Autowiring byName & byType Example

In this post, We will learn about the Spring Autowiring byName & byType Example using a Demo Project Autowiring in Spring The autowiring in the spring framework enables us to inject the object dependency implicitly. It’s internally using setter or constructor injection. One thing You should keep in mind that auto wiring can’t be used… Read More »