This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

access messages.properties

May 11th, 2007, 03:29 AM

Hello Friends,
For internationalization sake, I have defined messages in message.properties file. I have maintained different copies for different languages. It’s all fine now. Now, for generic error handling, I need access messages.properties values in DAO layer. How can access messages.properties in Spring Java Code?

with the last one you can get you're message properties anywhere on you're code, but seems to me that is not a god idea to attach messages from within a Dao, you better throw spring exceptions, like DataAccessException, ObjectRetrievalNotFound... etc.