master
ck 5 years ago
parent 019be22b0d
commit 3d34b17459

@ -1,6 +1,7 @@
package com.jingcheng.cms.controller;
import com.alibaba.fastjson.JSONObject;
import com.jingcheng.cms.constants.AppConstant;
import com.jingcheng.cms.model.Category;
import com.jingcheng.cms.service.ArticleSerive;
import com.jingcheng.cms.util.AjaxResult;
@ -20,8 +21,6 @@ import java.util.List;
@RestController
@RequestMapping("/api/article")
public class ArticleController {
@Value("${localFilePath}")
private String localFilePath;
@Autowired
private ArticleSerive articleSerive;
@ -114,7 +113,7 @@ public class ArticleController {
//文件后缀
String suffix = realFileName.substring(realFileName.lastIndexOf(".") + 1);
realFileName = fileName + "." + suffix;
String path =localFilePath;
String path = System.getProperty("user.dir")+ "\\upload\\";
//检查该路径对应的目录是否存在. 如果不存在则创建目录
File dir=new File(path);
if (!dir.exists()) {

@ -59,7 +59,6 @@ upload:
export:
path: /tmp/export/
localFilePath: upload/
wx:
BASE_URI: https://api.weixin.qq.com

Loading…
Cancel
Save