java - Spring doesn't resolve classpath: in the file declaration in xml -


i have problem resolve spring's "classpath:" feature. have file in next path:

src/main/java/resources/federationmetadata.xml 

also, have bean:

<bean id="metadata" class="org.springframework.security.saml.metadata.cachingmetadatamanager">     <constructor-arg>         <list>             <bean class="org.springframework.security.saml.metadata.extendedmetadatadelegate">                 <constructor-arg>                     <bean class="org.opensaml.saml2.metadata.provider.filesystemmetadataprovider">                         <constructor-arg>                             <value type="java.io.file">classpath:federationmetadata.xml</value>                         </constructor-arg>                         <property name="parserpool" ref="parserpool"/>                     </bean>                 </constructor-arg>                 <constructor-arg>                     <bean class="org.springframework.security.saml.metadata.extendedmetadata">                     </bean>                 </constructor-arg>             </bean>         </list>     </constructor-arg> </bean> 

so problem application fails next exception:

d:\myfolder\myproject\classpath:federationmetadata.xml not exist 

as understand spring doesn't resolve file location. tried classpath*:, , didn't help. in project have same settings (with "classpath:") , works fine. can be?

this issue driving me crazy well.

at point realized filesystemmetadataprovider replaced resourcebackedmetadataprovider.

so if have metadata xml inside of classpath, this:

<bean id="metadata" class="org.springframework.security.saml.metadata.cachingmetadatamanager">     <constructor-arg>         <list>             <bean class="org.opensaml.saml2.metadata.provider.resourcebackedmetadataprovider">                 <constructor-arg>                     <bean class="java.util.timer"/>                 </constructor-arg>                 <constructor-arg>                     <bean class="org.opensaml.util.resource.classpathresource">                         <constructor-arg value="/federationmetadata.xml"/>                     </bean>                 </constructor-arg>                 <property name="parserpool" ref="parserpool"/>             </bean>         </list>     </constructor-arg> </bean> 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -