Sunday, May 22, 2011

Load Properties in Spring MVC

This is a really trivial case, but I have to cover it, because you never know when you'll need it.

We have our application and we need to load a Properties file and use it, specifically in one of your Controllers, just like this...

I know! When we say spring + properties files, everybody think on this case (don't you?):
But this is not the case I want to cover right now, because the one I want to cover is this one:
String value = (String)properties.get(key);


Ahhhh! That's what I meant :D

How can I do that? Simple, trust in Spring! (may the Spring be with you :P ) By using Util Schema

Piece of cake
Pan comido

1 comment:

  1. Wow what a nice post. I am impressed from it.


    Thanks for more sharing........





    ZVN Properties

    ReplyDelete