I have a maven Spring project, there is xml file inside src/main/resources/xyz.xml. How can I read it inside spring MVC controller.
xml
src/main/resources/xyz.xml
I am us
You can add a field with annotation @Value to your bean:
@Value
@Value("classpath:xyz.xml") private Resource resource;
And then simply:
resource.getInputStream();