fixed sample code (SPR-6687)

master
Juergen Hoeller 15 years ago
parent 23b0f82173
commit f7952fccc8
  1. 8
      spring-framework-reference/src/resources.xml

@ -264,7 +264,7 @@
of code was executed against a of code was executed against a
<classname>ClassPathXmlApplicationContext</classname> instance:</para> <classname>ClassPathXmlApplicationContext</classname> instance:</para>
<programlisting language="java">Resource template = ctx.getResource("some/resource/path/myTemplate.txt);</programlisting> <programlisting language="java">Resource template = ctx.getResource("some/resource/path/myTemplate.txt");</programlisting>
<para>What would be returned would be a <para>What would be returned would be a
<classname>ClassPathResource</classname>; if the same method was executed <classname>ClassPathResource</classname>; if the same method was executed
@ -281,15 +281,15 @@
application context type, by specifying the special application context type, by specifying the special
<literal>classpath:</literal> prefix:</para> <literal>classpath:</literal> prefix:</para>
<programlisting language="java">Resource template = ctx.getResource("classpath:some/resource/path/myTemplate.txt);</programlisting> <programlisting language="java">Resource template = ctx.getResource("classpath:some/resource/path/myTemplate.txt");</programlisting>
<para>Similarly, one can force a <classname>UrlResource</classname> to be <para>Similarly, one can force a <classname>UrlResource</classname> to be
used by specifying any of the standard <classname>java.net.URL</classname> used by specifying any of the standard <classname>java.net.URL</classname>
prefixes:</para> prefixes:</para>
<programlisting language="java">Resource template = ctx.getResource("file:/some/resource/path/myTemplate.txt);</programlisting> <programlisting language="java">Resource template = ctx.getResource("file:/some/resource/path/myTemplate.txt");</programlisting>
<programlisting language="java">Resource template = ctx.getResource("http://myhost.com/resource/path/myTemplate.txt);</programlisting> <programlisting language="java">Resource template = ctx.getResource("http://myhost.com/resource/path/myTemplate.txt");</programlisting>
<para>The following table summarizes the strategy for converting <para>The following table summarizes the strategy for converting
<classname>String</classname>s to <classname>String</classname>s to

Loading…
Cancel
Save