集成redis & task

This commit is contained in:
limqhz
2022-05-04 02:45:31 +08:00
parent cf985bd44f
commit f701baaf04
10 changed files with 802 additions and 6 deletions

View File

@@ -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",