Spring bean reference example
In Spring, beans can “access” to each other by specify the bean references in the same or different bean configuration file. If you are referring to a bean in different…
Favourite tutorials for developers
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need to recompile.
In Spring, beans can “access” to each other by specify the bean references in the same or different bean configuration file. If you are referring to a bean in different…
In a large project structure, the Spring’s bean configuration files are located in different folders for easy maintainability and modular. For example, Spring-Common.xml in common folder, Spring-Connection.xml in connection folder,…
Normally, you will split a large Spring XML bean files into multiple small files, group by module or category, to make things more maintainable and modular. In Spring3 JavaConfig, the…
The concept of object-oriented is a good design to break your system into a group of reusable objects. However, when system grows larger, especially in Java project, the huge object…
Since Spring 3, JavaConfig features are included in core Spring module, it allow developer to move bean definition and Spring configuration out of XML file into Java class. But, you…
This tutorial shows you how to create a simple hello world example in Spring 3.0. Technologies used in this article :Spring 3.0.5.RELEASE, Maven 3.0.3, Eclipse 3.6, JDK 1.6.0.13 . In…
This quick guide example uses Maven to generate a simple Java project structure, and demonstrates how to retrieve Spring bean and prints a “hello world” string. Technologies used in this…
Spring @Profile allow developers to register beans by condition. For example, register beans based on what operating system (Windows, *nix) your application is running, or load a database properties file…
In Spring Boot, it picks .properties or .yaml files in the following sequences : application-{profile}.properties and YAML variants, application.properties and YAML variants. Tested :Spring Boot 2.1.2.RELEASE, Maven 3. This article…
In this article, we will show you how to use @Profile in Spring Boot and also how to test it. Tested with :Spring Boot 2.1.2.RELEASE, Maven 3. In Spring Boot,…