Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

load a file from classpath spring boot

	public void testResourceFile() throws IOException {
		File resource = new ClassPathResource("test.json").getFile();
		String text = new String(Files.readAllBytes(resource.toPath()));
	}
Source by frugalisminds.com #
 
PREVIOUS NEXT
Tagged: #load #file #classpath #spring #boot
ADD COMMENT
Topic
Name
9+1 =