• 15 July

    Spring boot @ConfigurationProperties

    In this tutorial, we are going to see about Spring boot @ConfigurationProperties annotation. Spring boot @ConfigurationProperties allows you to map properties values with java object easily. Let’s first see the normal mapping first. Let’s say you have properties file below. application.properties [crayon-60083b7785a7d677632193/] You can access above property file as below. [crayon-60083b7785a87432825710/] So, you can use @Value […]

  • 09 July

    Spring boot starters

    In this tutorial, we are going to see about Spring boot starters. This is part of Spring boot tutorial series. Dependency management is one of the critical tasks while working on any project. You want to create a new spring project with JPA capabilities. Do you know what dependencies you need to include? You might […]

  • 24 June

    No qualifying bean of type in Spring or Spring Boot

    In this post, we will see about an exception: No qualifying bean of type. Exceptions are least expected but you might get it while working with Spring. or Spring boot. Did you get this exception: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type? If yes, let’s see different reasons for it. Reason 1: You forgot to declare […]

  • 17 June

    Spring XML configuration example

    In this post, we will see how to create Spring hello world XML based configuration example. Here are simple steps to create Spring XML configuration example. 1. Create a simple java maven project. 2. Maven dependency put spring and cglib maven dependency in pom.xml. [crayon-60083b778649b443487959/] So your pom.xml will look like: [crayon-60083b778649e142358464/] 3. Create Bean class […]

  • 15 June

    Injecting Prototype bean into a Singleton bean in Spring

    In this post, we will see how to inject prototype bean scope into Singleton Instance in Spring. This is one of the most asked Spring interview questions. Problem When you inject prototype bean to singleton bean, prototype bean still behave like a singleton bean. Let’s understand this with the help of example. 1. Create a […]

  • 15 June

    Circular dependencies in Spring

    In this post, we will discuss one of the most asked Spring interview questions. What happens if there are circular dependencies in Spring. Problem What if there are circular dependencies in Spring? For example: Class A requires an instance of Class B and Class B requires an instance of Class A. Let’s create an example […]

  • 06 August

    Top 15 Spring Boot Interview questions

    In this post, we will see top 15 Spring Boot interview questions with answers.If you want to read more about Spring boot, you can go through Spring boot tutorial. If you are looking for below queries then this post will help you as well. Spring boot interview questions for 3 years experience Spring boot interview […]

  • 06 May

    Print all beans loaded by Spring Boot

    In this post, we will see how to print all the beans loaded by Spring boot. We have already created a sample spring boot hello world program using JSP. You must be wondering what beans have been loaded by Spring in background. Change SpringBootHelloWorldApplication.java as below: [crayon-60083b7786cb1049747218/] You just need to implement CommandLineRunner and get ApplicatationContext […]

  • 13 May

    Spring Boot Hibernate example

    In this post, we are going to see how to create Spring boot hibernate example. We will use Spring boot 1.5.3 Release version, it comes with hibernate 5. We will create a Spring boot hibernate application which will have JSP as user interface. It will provide user interface from which you can add, update or […]