How can I make properties files mandatory in Spring?

Posted by Paulo Guedes on Stack Overflow See other posts from Stack Overflow or by Paulo Guedes
Published on 2010-05-04T10:55:28Z Indexed on 2010/05/04 10:58 UTC
Read the original article Hit count: 252

Filed under:
|
|

I have an ApplicationContext.xml file with the following node:

<context:property-placeholder 
location="classpath:hibernate.properties, classpath:pathConfiguration.properties" />

It specifies that both properties files will be used by my application. But if one of these files does not exist, no error ir thrown.

How can I throw an exception for any of these files? They should me mandatory.

© Stack Overflow or respective owner

Related posts about spring

Related posts about java