I having file in the location
--src --> main --> config --> application --> context --> reference --> user
Use as below
Resource resource = new ClassPathResource("/application/context/references/user/user.xml"); File file = resource.getFile();