Use Spring Resource Instead of File for Factory Beans
Cantor, Scott
cantor.2 at osu.edu
Wed Oct 16 14:09:20 EDT 2013
On 10/16/13 2:02 PM, "Marvin S. Addison" <marvin.addison at gmail.com> wrote:
>I did note that component and decided against it since one of the values
>of using Spring Resources is the automatic type conversion from paths to
>resources, classpath: -> ClassPathResource, file: -> FileSystemResource.
>That was a substantial value-add in my mind; of course you could do the
>same with custom ConversionService for the java-support component.
Yes, I'm just saying that the use of File seems like an anachronism or a
path of least resistance issue when the factory was done, but the general
question of Resource hierarchy is open at the moment. Even if we did stay
with our own, I guarantee we'd add code to make the bean syntax simpler.
I'm screwing around right now with SPEL and converters and such trying to
facilitate various things.
The only reason this is open at all is the dependency issue. If we build
the MetadataResolver on top of Spring Resources, then the whole opensaml
package ends up with a Spring dependency. If Spring Resources were in
their own jar, I suspect we'd be much more happy to do it.
I don't suppose they factored that out in 4.0, which I see is almost done?
-- Scott
More information about the dev
mailing list