|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | import org.springframework.util.ClassUtils; | 
|---|
|  |  |  | import org.springframework.util.ObjectUtils; | 
|---|
|  |  |  | import org.springframework.util.ResourceUtils; | 
|---|
|  |  |  | import org.springframework.web.multipart.MultipartFile; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.io.FileNotFoundException; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.HashMap; | 
|---|
|  |  |  | import java.util.LinkedHashMap; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public Map<String, Object> add(MultipartFile[] files, Supervision supervision) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String path = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "static/img/"; | 
|---|
|  |  |  | String path = null; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | path = ResourceUtils.getURL("classpath:").getPath() + "static/img/"; | 
|---|
|  |  |  | } catch (FileNotFoundException e) { | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> result = new HashMap<>(); | 
|---|
|  |  |  |  | 
|---|