In this tutorial, we'll write code to implement the BeanFactory concept that we learnt in our previous tutorial. We'll write a Spring XML to configure a Spring bean. Then we'll use the BeanFactory to instantiate our bean in the Spring container.
We'll now look at a configuration feature provided by Spring to wire dependencies automatically: Bean Autowiring. We'll learn about different types of autowiring, and we'll write some code to implement bean autowiring by name.
We'll provide our beans with access to the ApplicationContext object by implementing the ApplicationContextAware interface. We'll also use BeanNameAware interface to get the name of the bean configured in the Spring XML.
Here we'll have our first look at Spring annotations. We'll understand and implement the Required annotation, and we'll also learn how it's actually a BeanPostProcessor that's working behind the scenes.
In this first part of the tutorial, we'll create a Spring project that forms the basis for our Aspect. This is a good refresher of some of the core Spring concepts, and it also give us an opportunity to introduce a service layer in our code that we'll build on in the subsequent tutorials.
In this video, I share some thoughts on naming conventions, and how it helps in the case of writing aspects in Spring. We will also understand how to write our own custom annotations to apply advice to methods.
In this video, we go where no Spring AOP tutorial has gone before! We'll understand how Spring AOP works and how it uses proxy classes to apply advice. And we'll do this by implementing our own simple factory service. The way Spring AOP works is much more complicated, but this simple implementation should give us a solid understanding of proxy objects and clarify the core concepts.
This tutorial serves as an introduction to Spring Data support. We'll also install a lightweight database Apache Derby that we'll use in subsequent tutorials. We'll learn how to start Derby in Network server mode, and how to connect and run SQL queries using the ij client tool.
We'll now implement a simple DAO class that fetches data from the database using JDBC. We'll look at all the boilerplate code we need to write to establish connections, execute queries, close objects and handle exceptions.
We'll now add the Spring framework to our JDBC project. We'll add dependency injection to our Main and DAO class. We'll also learn how to configure DataSource as a Spring bean and supply connection parameters to it in the XML file.
We'll use the JdbcTemplate class provided by Spring to implement a DAO method. We'll see how using the template class makes the DAO methods simple, and how it takes care of much of the boilerplate code we'd have to write otherwise.
We returned an integer datatype result from our query in the previous tutorial. In this tutorial, we'll learn how to return other datatypes. We'll implement a method that returns a String query output.
In this video, we'll learn how to integrate the Hibernate framework in our Spring application. We'll create a SessionFactory as a Spring singleton and use that in our DAO class to work with the database.