xxxxxxxxxx
ClassPathResource resource = new ClassPathResource("fileName");
InputStream inputStream = resource.getInputStream();
xxxxxxxxxx
InputStream is = getClass().getClassLoader().getResourceAsStream("file.txt");
xxxxxxxxxx
ClassPathResource resource = new ClassPathResource("fileName");
InputStream inputStream = resource.getInputStream();