I have a file in place
--src --> main --> config --> application --> context --> reference --> user --> user.xml
Where
is on the way to classes. Now I'm trying to access the file using
Resource resource = new ClassPathResource("classpath**:/application/context/references/user/user.xml"); File file = resource.getFile();
But I get a FileNotFoundException , I tried with
Resource resource = new ClassPathResource("classpath:/application/context/references/user/user.xml"); File file = resource.getFile();
too, but still I get an exception. Can someone help me understand the operation of ClassPathResource and the correct solution?
source share