Properties with Spring and Spring Boot 1. Overview This tutorial will show how to set up and use Properties in Spring – via Java configuration and @PropertySource or via XML and <property-placeholder>, as well how properties work in Spring Boot. Further reading: Spring Expression Language Guide This article explores Spring… Continue Reading properties-with-spring

Constructor Dependency Injection in Spring 1. Introduction Arguably one of the most important development principles of modern software design is Dependency Injection (DI) which quite naturally flows out of another critically important principle: Modularity. This article will explore a specific type of DI technique called Constructor-Based Dependency Injection within Spring… Continue Reading constructor-injection-in-spring

Intro to Inversion of Control and Dependency Injection with Spring 1. Overview In this article, we’ll introduce the concepts of IoC (Inversion of Control) and DI (Dependency Injection), and we’ll then take a look at how these are implemented in the Spring framework. Further reading: Wiring in Spring: @Autowired, @Resource… Continue Reading inversion-control-and-dependency-injection-in-spring

Project Configuration with Spring Table of Contents * 1. Configuration Must Be Environment Specific * 2. The .properties files for Each Environment * 3. The Spring Configuration * 4. Setting the Property in Each Environment * 5. Testing and Maven * 6. Going Further * 7. Conclusion 1. Configuration Must… Continue Reading project-configuration-with-spring

A Quick Guide to Spring @Value 1. Overview In this quick article, we’re going to have a look at the @Value Spring annotation. This annotation can be used for injecting values into fields in Spring-managed beans and it can be applied at the field or constructor/method parameter level. Further reading:… Continue Reading spring-value-annotation

@Component vs @Repository and @Service in Spring   1. Introduction In this quick tutorial, we’re going to learn about the differences between @Component, @Repository, @Service annotations, in the Spring Framework. Further reading: Guide to Spring @Autowired A guide to the most commonest usage of Springs @Autowired annotation and qualifiers Read more → The… Continue Reading spring-component-repository-service

Wiring in Spring: @Autowired, @Resource and @Inject 1. Overview This Spring Framework article will demonstrate the use of annotations related to dependency injection, namely the @Resource, @Inject, and @Autowired annotations. These annotations provide classes with a declarative way to resolve dependencies. For example: @Autowired ArbitraryClass arbObject; as opposed to instantiating… Continue Reading spring-annotations-resource-inject-autowire