목록파일 (2)
개발 무지렁이

[article/write.html] 글쓰기 제목 내용 본문이미지 [Util.java] public class Util { public static class date { public static String getCurrentDateFormatted(String pattern) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern); return simpleDateFormat.format(new Date()); } } public static class file { public static String getExt(String filename) { return Optional.ofNullable(filename) .filter(f -> ..

업로드한 파일을 웹서버에서 접근가능하도록 [WebMvcConfig.java] @Configuration public class WebMvcConfig implements WebMvcConfigurer { @Value("${custom.genFileDirPath}") private String genFileDirPath; @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/gen/**") .addResourceLocations("file:///" + genFileDirPath + "/"); } } 로그인된 회원의 프로필 이미지 노출 [HomeController.jav..