change author and add skywalking photo
This commit is contained in:
@@ -5,8 +5,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* 文件中心
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
|
||||
@@ -8,8 +8,9 @@ import org.springframework.context.annotation.Configuration;
|
||||
import com.aliyun.oss.OSSClient;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* 阿里云配置
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Configuration
|
||||
public class AliyunOSSConfig {
|
||||
|
||||
+2
-1
@@ -13,9 +13,10 @@ import org.springframework.context.annotation.Configuration;
|
||||
import com.central.file.model.FileType;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* FileService工厂<br>
|
||||
* 将各个实现类放入map
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Configuration
|
||||
public class OssServiceFactory {
|
||||
|
||||
@@ -10,8 +10,9 @@ import com.qiniu.storage.UploadManager;
|
||||
import com.qiniu.util.Auth;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* 七牛云配置
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Configuration
|
||||
public class QiniuOSSConfig {
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import com.central.file.model.FileType;
|
||||
* 文件上传 同步oss db双写 目前仅实现了阿里云,七牛云
|
||||
* 参考src/main/view/upload.html
|
||||
*
|
||||
* @author zlt
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@RestController
|
||||
public class FileController {
|
||||
|
||||
@@ -12,8 +12,9 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* file实体类
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.central.file.model;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* 仅支持阿里云 oss ,七牛云等
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
public enum FileType {
|
||||
//七牛
|
||||
|
||||
@@ -9,8 +9,9 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import com.central.file.model.FileInfo;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* 文件service 目前仅支持阿里云oss,七牛云
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
public interface IFileService extends IService<FileInfo> {
|
||||
FileInfo upload(MultipartFile file ) throws Exception;
|
||||
|
||||
+3
-2
@@ -18,10 +18,11 @@ import com.central.file.utils.FileUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* AbstractIFileService 抽取类
|
||||
* 根据filetype 实例化具体oss对象
|
||||
*/
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Slf4j
|
||||
public abstract class AbstractIFileService extends ServiceImpl<FileMapper, FileInfo> implements IFileService {
|
||||
@Override
|
||||
|
||||
+2
-1
@@ -10,8 +10,9 @@ import com.central.file.model.FileInfo;
|
||||
import com.central.file.model.FileType;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* 阿里云oss存储文件
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Service("aliyunOssServiceImpl")
|
||||
public class AliyunOssServiceImplI extends AbstractIFileService {
|
||||
|
||||
+2
-1
@@ -17,8 +17,9 @@ import com.qiniu.util.Auth;
|
||||
import com.qiniu.util.StringMap;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* 七牛云oss存储文件
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Slf4j
|
||||
@Service("qiniuOssServiceImpl")
|
||||
|
||||
@@ -11,9 +11,10 @@ import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* 文件工具类
|
||||
*/
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Slf4j
|
||||
public class FileUtil {
|
||||
private FileUtil() {
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@EnableLoginArgResolver
|
||||
@EnableDiscoveryClient
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "菜单模块api")
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
* 角色管理
|
||||
*/
|
||||
@Slf4j
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
* 用户
|
||||
*/
|
||||
@Slf4j
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
|
||||
+1
-3
@@ -31,9 +31,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* userService
|
||||
*
|
||||
* @author zlt
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
|
||||
Reference in New Issue
Block a user