Browse Source

'启动问题解决'

HUJIANGUO 3 years ago
parent
commit
75f60fcf27

+ 1 - 1
src/main/java/com/steerinfo/dil/controller/RmsMaterialSteelController.java

@@ -42,7 +42,7 @@ public class RmsMaterialSteelController extends BaseRESTfulController {
 
     @PostMapping("/upload")
     @ResponseBody
-    public Map<String, String> uploadImg(@RequestParam("file") MultipartFile file, HttpServletRequest request) throws IOException {
+    public Map<String, String> upFile(@RequestParam("file") MultipartFile file, HttpServletRequest request) throws IOException {
         return rmsMaterialSteelService.upFile(file, request);//这里调用service的upfile方法,传入两个参数。
     }
 

+ 0 - 16
src/main/java/com/steerinfo/dil/service/ResourceRepository.java

@@ -1,16 +0,0 @@
-package com.steerinfo.dil.service;
-
-import org.springframework.core.io.Resource;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-/**
- * @Description:
- * @Author:HuJianGuo
- * @GreateTime:2021/12/8 11:44
- * @Version:V2.0
- */
-public interface ResourceRepository extends JpaRepository<Resource, String> {
-
-    Resource findResourceByName(String Name);//可以不用写这些方法,如果你只用了save这一个方法
-    Resource findResourceById(String Id);
-}

+ 0 - 4
src/main/java/com/steerinfo/dil/service/impl/RmsMaterialSteelServiceImpl.java

@@ -2,7 +2,6 @@ package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.mapper.RmsMaterialSteelMapper;
 import com.steerinfo.dil.service.IRmsMaterialSteelService;
-import com.steerinfo.dil.service.ResourceRepository;
 import com.steerinfo.dil.util.FtpUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -35,9 +34,6 @@ public class RmsMaterialSteelServiceImpl implements IRmsMaterialSteelService {
 
     @Autowired
     FtpUtil ftpUtil;
-
-    @Autowired
-    private ResourceRepository repository;
     /**
      * 得到没有质保书的炉号
      * @return

+ 0 - 5
src/main/java/com/steerinfo/dil/util/FtpUtil.java

@@ -1,9 +1,7 @@
 package com.steerinfo.dil.util;
 
-import com.steerinfo.dil.service.ResourceRepository;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPReply;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.io.IOException;
@@ -28,9 +26,6 @@ public class FtpUtil {
     private static final String FTP_PASSWORD = "Ils2021";
     //路径都是/home/加上用户名
     public final String FTP_BASEPATH = "/usr/local/src/file";
-    //
-    @Autowired
-    private ResourceRepository resourceRepository;
 
     //参数传过来了文件和文件的输入流
     public boolean uploadFile(String originFileName, InputStream input) {