Blog Archives

Spring loading properties files with ApplicationContextInitializer

Spring 3.1 introduced a very convenient hook for customizing the application context with ApplicationContextInitializer. It can be used to set active profiles and register custom property sources.

The web.xml can configure the “contextInitializerClasses”.

It can also be used in JUnit tests as shown below.

Posted in Spring other tutorial

Spring tutorial to read .proprties files

Q1. How do you read properties file in spring? A1. PropertyPlaceholderConfigurer allows you to share a properties files. You can simply share one properties file for all of your build info or you can separate things out, and have multiple properties files in your build script. STEP 1: Prepare the

Read more ›

Posted in Spring other tutorial

800+ Interview Q&As with lots of diagrams & code ♥Free | ♦FAQs | Hover/Slide for full text

open all | close all

200+ Java Interview FAQs – Quick Prep

open all | close all

16 Java Key Areas to be a top-notch

open all | close all

80+ Java Tutorials – Step by step

open all | close all

100+ Java Coding Exercises

open all | close all

How good are your

open all | close all