We have some tests which needed a json example for reproduction. I think it would be better if we can ability to easy load them or other files from resource directory instead of defining them into class. It'll makes code more clarity and readable.

For example val body = """ { "bytes": [ 1, 2 ], "array": [ "Foo", "Bar" ], "number": 42, "string": "Foo", "bool": true, "fraction": 42 } """.trimIndent()

can be changed to val body = ResourceClasspathFileUtil("org/springframework/request.json").readText()

Comment From: pivotal-cla

@divinenickname Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@divinenickname Thank you for signing the Contributor License Agreement!

Comment From: bclozel

I think this is already covered by new ClassPathResource ("some/resource.json"); this has been made even easier with #24651. I'm declining this PR as a result.

Thanks for your contribution!