Springにはまったく新しいので、これにいくつか問題があります。私は春にLDAPセキュリティを使用しようとしています。私はwebapp内で作成したプロパティファイルを使用できます。しかし、私がしたいのは、サーバーのcontext.xmlファイルをロードして読み込むことです(このアプリケーションや他のアプリケーションに必要なすべての値があります)。Springを使用してwebserver context.xmlをロードする
これは私が持っているものです。
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true"/>
</bean>
<bean class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer">
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
<property name="searchContextAttributes" value="true"/>
<property name="contextOverride" value="true"/>
<property name="ignoreResourceNotFound" value="true"/>
<property name="locations">
<list>
<value>/WEB-INF/properties/dataUploadProperties.properties</value>
<value>/WEB-INF/properties/globalProperties.properties</value>
<value>context.xml</value>
</list>
</property>
</bean>
私は2つのプロパティファイルをロードし、読むことができるんだけど、context.xmlには見つかりませんでした。それはサーバー上の絶対パスである必要がありますか?
おかげ クリス
。私は各サーバーは別のURLを持っているので、サーバーcontext.xmlファイルからLDAPのURLを取得しようとしています。ありがとう –
@Chris Mattmiller:この場合は、context.xmlのLDAP接続をjndi ressourceとして定義する必要があります – Ralph
jndiリソースとして設定すると、このエラーが表示されます。1行目、1列目の字句エラー: "$"(36)、後: "" –