ClassPathResource resource = new ClassPathResource("fileName"); InputStream inputStream = resource.getInputStream();