Autowire using Java Based Spring Configuration

In one of our earlier post, we saw an example of Java based Spring Configuration. In that example, we created a Configuration class and wired the beans manually. In this example, we’ll autowire the Spring beans using @Autowired and other stereotype annotations and explore the power of auto wiring in Java based Spring Configuration. Class … Read more

Java based Spring Configuration

In the previous articles, we saw how to configure the beans based on XML and annotations. In this example, we’ll learn how we can configure beans based Java configuration, a third approach to configure Spring beans. We’ll follow the similar class design by coding to interfaces. Class Structure Item – a POJO class to store … Read more

Autowire Spring Beans using XML Configuration

Let’s look at the examples to Autowire the Spring beans by constructor, by type and by their names using Spring XML configuration. Class Structure Product – a POJO class to store product info ProductDAO – an interface that we will use in a dependent service class ProductDAOImpl – an implementation of ProductDAO returns list of … Read more