1.优化代码结构,抽象预览接口服务
2.新增更多图片预览格式支持
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
package cn.keking.service.impl;
|
||||
|
||||
import cn.keking.service.FilePreview;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
/**
|
||||
* Created by kl on 2018/1/17.
|
||||
* Content :处理pdf文件
|
||||
*/
|
||||
@Service
|
||||
public class PdfFilePreviewImpl implements FilePreview{
|
||||
|
||||
@Override
|
||||
public String filePreviewHandle(String url, Model model) {
|
||||
model.addAttribute("pdfUrl", url);
|
||||
return "pdf";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user