集成redis & task
This commit is contained in:
@@ -10,6 +10,7 @@ import com.quinn.service.SourceCategoryService;
|
||||
import com.quinn.service.SourceCommentService;
|
||||
import com.quinn.service.SourceService;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -129,7 +130,7 @@ public class SourceController {
|
||||
* @throws IOException
|
||||
*/
|
||||
@GetMapping("/source/download/{sid}")
|
||||
public void read(HttpServletResponse response, @PathVariable("sid") String sid) throws IOException {
|
||||
public void download(HttpServletResponse response, @PathVariable("sid") String sid) throws IOException {
|
||||
Source source = sourceService.getOne(new QueryWrapper<Source>().eq("id", sid));
|
||||
//通知浏览器以附件形式下载
|
||||
response.setHeader("Content-Disposition",
|
||||
|
||||
Reference in New Issue
Block a user