Month: November 2015

In the 1.3.0 release of Spring Boot and new module is available called Spring Boot Developer Tools. This new Spring Boot module is aimed at improving developer productivity in building Spring Web Applications. When you’re developing a web application in Java, or really any programming language, a common workflow is to code, compile, deploy, and then […]Continue reading

Core to the Spring Framework is a concept of bean factories. Spring bean factories follow the concepts of the GoF Factory Design Pattern to provide the requestor fully configured objects. Under the covers when the Spring Framework is performing dependency injection on your beans, Spring itself will use bean factories to obtain a fully configured […]Continue reading

During the creation of Spring Beans, you can obtain the name of the bean by implementing the Spring interface – BeanNameAware. Then during the creation of Spring beans, the Spring Context will inject the name it has set for the bean. This is the name the Spring Bean factory will use as a reference to […]Continue reading

When Autowiring Spring Beans, a common exception is a BeanCreationException. This means that Spring found a bean to create, but was unable to fulfill the dependencies needed to create this this Spring bean. Here is an example of a BeanCreationException: BeanCreationException Exception in thread “main” org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘helloController’: Injection of autowired […]Continue reading

When Autowiring Spring Beans, a common error is to see a NoSuchBeanDefinitionException. Here is an example of the NoSuchBeanDefinitionException you may see thrown by the Spring context: NoSuchBeanDefinitionException Exception in thread “main” org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [guru.springframework.controllers.HelloController] is defined at at at By default, Spring will Autowire beans by type. You […]Continue reading