views:

38

answers:

1

I'm trying to set a bean property like this:

<bean id="threadImport" class="com.foo.bat.util.ThreadImport" singleton="false">
  <property name="mailSender" ref="mailSender"/>
  <property name="parseConfFile" value="classpath:parse/import.xml" />
  <property name="logFilename" value="/tmp/import.log" />

but none of files are found. What's the classpath for my deployed application? May I set it on any weblogic xml descriptors? Which is the best way to place and locate files used on spring applications?

+1  A: 

I am using:

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

The properties file is either location at the root of my test source folder so JUnit has a test-specific config available and in production, we have added a classpath entry to Weblogic pointing to the configuration folder. You can do that in the setDomainEnv.sh or for Managed Servers, in their configuration (web console), server start, classpath.

Eric Darchis