views:

19

answers:

1

Consider a factory bean. It takes a single property of type Map<String, Object>. It carefully checks all the Objects for 'instanceof Resource' and does resource processing appropriately.

I configure this bean like:

<bean id='fact' class='my.class'>
  <property name='map'>
    <map>
      <entry key="x" value="file:/WEB-INF/foo.txt"/>
    </map>
  </property>
 </bean>

In the debugger, I see that the setter for the property is called with a Map, and the value is a java.lang.String with the file: still sitting on it.

Since there is no explicit prefix for servlet context resources, I am now officially puzzled.

In my previous question, the 'solution' turned out to be to correct a really stupid default configuration of the maven-jetty-plugin.

Apologies for the rewrite, but no one answered yet :-)

+1  A: 

More and more googling eventually revealed:

<entry key="grammarURL">
            <value type="org.springframework.core.io.Resource">classpath:/com/basistech/ras/rules.jape</value>
</entry>
bmargulies