Use Spring Resource Instead of File for Factory Beans

Marvin S. Addison marvin.addison at gmail.com
Wed Oct 16 14:02:13 EDT 2013


> I would have assumed we were using the java-support Resource abstraction
> rather than File directly.

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.

M


More information about the dev mailing list