MultipartFile 썸네일형 리스트형 Spring 현재 날짜를 기준으로 업로드 폴더 생성 및 업로드 Service Layer 에서 파일 업로드 구현 @Value("${local.files-path}") String rootPath; //properties에서 저장할 로컬 루트 경로를 가져온다. @Override @Transactional(rollbackFor = Exception.class) public void storeFile(MultipartFile file) { Date createDate = new Date(); String year = (new SimpleDateFormat("yyyy").format(createDate)); //년도 String month = (new SimpleDateFormat("MM").format(createDate)); //월 String day = (new Sim.. 더보기 이전 1 다음