Demo如下:
package com.ztkj.engine.portal.controller;
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.model.ObjectMetadata;
import com.ztkj.engine.common.result.Response;
import com.ztkj.engine.portal.entity.bean.Region;
import com.ztkj.engine.portal.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
* 版本 开发者 创建日期
* 1.0.0 InetCommunity(^_^)on 2018/12/25.
*/
@RestController
@RequestMapping("/common")
public class CommonController {
@Value("${OSS.BUCKET_NAME}")
private String BUCKET_NAME;
@Value("