优化:重构代码
This commit is contained in:
@ -2,8 +2,6 @@ package cn.keking.service.impl;
|
||||
|
||||
import cn.keking.model.FileAttribute;
|
||||
import cn.keking.service.FilePreview;
|
||||
import cn.keking.utils.FileUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.Model;
|
||||
/**
|
||||
@ -15,9 +13,6 @@ import org.springframework.ui.Model;
|
||||
@Service
|
||||
public class MediaFilePreviewImpl implements FilePreview {
|
||||
|
||||
@Autowired
|
||||
FileUtils fileUtils;
|
||||
|
||||
@Override
|
||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||
model.addAttribute("mediaUrl", url);
|
||||
|
||||
Reference in New Issue
Block a user