Created
June 1, 2018 04:56
-
-
Save namkyu/6c6e9644ce2f56dbd2fa45b05a29f28a to your computer and use it in GitHub Desktop.
파일 read #java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// webApp 스타일 | |
String templatePath = "excel/template_delivery.xls"; | |
System.out.println("클래스 로더 : " + getClass().getClassLoader().getResource(templatePath).toString()); | |
// spring boot 스타일 | |
ClassPathResource classPathResource = new ClassPathResource(templatePath); | |
System.out.println("클래스 패스 리소스 getPath : " + classPathResource.getPath()); | |
System.out.println("클래스 패스 리소스 getURL : " + classPathResource.getURL()); | |
System.out.println("클래스 패스 리소스 toString : " + classPathResource.toString()); | |
URL url = ResourceUtils.getURL(templatePath); | |
System.out.println(url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment