This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
Denis Viktorov wrote:Okay, i understand the problem.
Spring 3.1 by default loads not only my properties, but also environment vars/props.
In my situations Spring loads windows environment variables and among them was 'username' variable, which overrides my 'username' property.
Yeah that is a funny gotcha that sometimes happens. The properties loader for context, was PropertyPlaceholderConfig. It will by default first look in the .properties file, then go to System.getProperty(), then look at OS environment variables, and use the first one it finds. That is by default. You can change that, you can flip the order, or you can tell it to just use the .properties file and look no further. Those are properties of the class that you can set in your configuration.