Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One potential issue is that you are hardcoding the location of your properties file. You could specify the location of the properties file as a JNDI resource and falling back on the defaults specified on the classpath:</p> <pre><code>&lt;!-- try to lookup the configuration from a URL, if that doesn't work, fall back to the properties on the classpath --&gt; &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt; &lt;property name="location"&gt; &lt;bean class="org.springframework.core.io.UrlResource"&gt; &lt;constructor-arg&gt; &lt;jee:jndi-lookup jndi-name="url/config" default-value="file:///tmp" /&gt; &lt;!-- dummy default value ensures that the URL lookup doesn't fall over if the JNDI resource isn't defined --&gt; &lt;/constructor-arg&gt; &lt;/bean&gt; &lt;/property&gt; &lt;property name="properties"&gt; &lt;bean class="org.springframework.beans.factory.config.PropertiesFactoryBean"&gt; &lt;property name="locations"&gt; &lt;list&gt; &lt;value&gt;classpath:com/company/default.properties&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; &lt;/property&gt; &lt;property name="ignoreResourceNotFound" value="true"/&gt; &lt;/bean&gt; </code></pre> <p>That way you can specify different file names for different environments using the WAS console in Resources > URL > URLs by creating a resource with the JNDI-name "url/config" and pointing it to the correct file (file:///your/path/to/properties).</p> <p>As an alternative solution, if you want to manage individual properties through the console, you instead of using the PropertyPlaceholderConfigurer you could use jee:jndi-lookup to get values from the web.xml env-entries (which you can manage using the WAS console). See <a href="https://stackoverflow.com/questions/1866415/how-to-store-mail-password-on-server-side/1866992#1866992">this answer</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload