How can I load a Spring resource contents and use it to set a bean property or pass it as an argument constructor?
The resource contains free text.
In one line try this to read test.xml:
String msg = StreamUtils.copyToString( new ClassPathResource("test.xml").getInputStream(), Charset.defaultCharset() );
1.4m articles
1.4m replys
5 comments
56.9k users