jinpengyong
2022-01-14 0a51bd51d3f036b874c8499c5726026621f29a4c
update
1 files modified
7 ■■■■■ changed files
screen-api/src/main/java/com/moral/api/service/impl/SupervisionServiceImpl.java 7 ●●●●● patch | view | raw | blame | history
screen-api/src/main/java/com/moral/api/service/impl/SupervisionServiceImpl.java
@@ -12,6 +12,7 @@
import com.moral.util.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.system.ApplicationHome;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile;
@@ -42,9 +43,9 @@
    @Override
    public Map<String, Object> add(MultipartFile[] files, Supervision supervision) {
        String path = this.getClass().getClassLoader()
                .getResource("").getFile() + "static/img/";
        System.out.println("image path=>" + path);
        ApplicationHome applicationHome = new ApplicationHome(getClass());
        String path = applicationHome.getSource().getParentFile().getPath()+"/static/img/";
        Map<String, Object> result = new HashMap<>();