Registering multiple @Configuration annotated Classes

In the previous post under Spring Core, I explained with example the purpose of “@Configuration” annotation. Just for recap, classes marked with “@Configuration” annotation are informing the Spring framework that it contains bean definitions. Let’s call class marked with “@Configuration” as “Configuration Class”. It will help you in understanding this post. Spring then uses “AnnotationConfigApplicationContext”…… Continue reading Registering multiple @Configuration annotated Classes

Spring @Bean and @Configuration Simple Example

In this post under Spring Core, I will explain with example the purpose of “@Bean” and “@Configuration” annotation. Earlier before the introduction of annotations in Spring project, we used to define beans in xml file. For example if we had a classes as shown below package package1; public class Bean1 { @Override public String toString()…… Continue reading Spring @Bean and @Configuration Simple Example