Domain properties in Glassfish

You can make properties files available to you WAR and EAR applications by putting the file in the folder glassfish/domains/${glassfish.domain.name}/lib/classes

You can use these in your spring configuration by prefixing the resource name with classpath:. For example:

<beans:bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <beans:property name="location" value="classpath:some.properties"/>
</beans:bean>

Leave a Reply

Your email address will not be published. Required fields are marked *