mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 20:49:00 +08:00
🔥 Removing code or files. 删除 feign 文件上传demo
This commit is contained in:
1 parent
5c0dadb6f6
commit
8e19a9e0e9
2 files changed
-50
No files matched your search
-42
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.admin.api.feign;
|
||||
|
||||
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/6/28
|
||||
*/
|
||||
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.UPMS_SERVICE)
|
||||
public interface RemoteFileService {
|
||||
/**
|
||||
* 保存日志
|
||||
*
|
||||
* @return succes、false
|
||||
*/
|
||||
@PostMapping("/file/upload2")
|
||||
R<Boolean> saveLog(@RequestParam("file") MultipartFile file);
|
||||
}
|
||||
-8
@@ -20,7 +20,6 @@ package com.pig4cloud.pigx.admin.controller;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.pig4cloud.pigx.admin.api.entity.SysFile;
|
||||
import com.pig4cloud.pigx.admin.api.feign.RemoteFileService;
|
||||
import com.pig4cloud.pigx.admin.service.SysFileService;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import com.pig4cloud.pigx.common.log.annotation.SysLog;
|
||||
@@ -47,7 +46,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
@Api(value = "sys-file", tags = "文件管理")
|
||||
public class SysFileController {
|
||||
private final SysFileService sysFileService;
|
||||
private final RemoteFileService fileService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
@@ -86,12 +84,6 @@ public class SysFileController {
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
public R upload(@RequestParam("file") MultipartFile file) {
|
||||
return fileService.saveLog(file);
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/upload2")
|
||||
public R upload2(@RequestParam("file") MultipartFile file) {
|
||||
return sysFileService.uploadFile(file);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user