Spring 4 xml configuration example

The Spring 4 xml configuration example shows you how to use Spring XML Based Configuration via a simple Spring application. This application involves a service which will display a simple message to the console and we configure this application with Spring XML. Then, we bootstrap the Spring context(ApplicationContext) using the ClassPathXmlApplicationContext. Maven Dependencies To build … Read moreSpring 4 xml configuration example

Spring Inject Logger using Annotation

The Spring Inject Logger using Annotation tutorial shows you how to inject a logger with custom annotation. This tutorial helps you inject a logger into anywhare you want it. You will get the benefits in the testing work and operating application. Logger Dependencies In this Spring Inject Logger using Annotation tutorial, we are using two … Read moreSpring Inject Logger using Annotation

Spring @Value Annotation Example

Spring @Value Annotation Example show you how to inject properties or system properties into a spring bean using the spring @Value annotation. You can also refer to the previous tutorial that show how to inject properties from a file or multi files using spring xml. Let’s begin: Example application.properties file Here are some properties that … Read moreSpring @Value Annotation Example

Read Properties File in Spring Xml using PropertyPlaceholderConfigurer

The Read Properties File in Spring Xml tutorial show you how to load properties from a file using spring property placeholder. In Spring, we can use PropertyPlaceholderConfigurer to parameterize property values from a bean definition in a separate file. This helps developer organize specific properties in a external file instead of having to hard code … Read moreRead Properties File in Spring Xml using PropertyPlaceholderConfigurer

Spring Component Scan Example

Spring Component Scan Example shows you how to use spring xml auto component scanning. First, you will be introduced the traditional way using only xml to configure spring beans. Then you will be familiar with the auto component scanning option. The auto component scanning will enable Spring to automatically look up spring beans annotated with … Read moreSpring Component Scan Example

Please share it if you found this useful
Hide Buttons