-
Dec 18th, 2011, 03:25 AM
#1
ClasspathResource with property placeholders?
Hi,
I have some text file, which I treat as "ClasspathResource" (and I inject it into a bean that reads it).
I'd like this text file to contain property placeholders.
Is there some built-in support for it? Obviously I can write my own Resource implementation, but I wondered if there's already an existing one.
The result should be something like:
<bean class="MyReader">
<property name="resource" ref="resource">
</bean>
where "resource" gives an input stream that reads "Hello, mister JOHN" that is constructed from the following file, injecting "JOHN" into the placeholder:
// my.txt
Hello, mister ${name}
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules