mirror of
https://github.com/201206030/novel-plus.git
synced 2025-09-14 05:02:43 +00:00
perf: 优化缓存模块
提升可读性 & 减小内存占用
This commit is contained in:
@@ -9,7 +9,7 @@ import com.java2nb.novel.service.FriendLinkService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -31,7 +31,7 @@ public class FriendLinkController {
|
||||
@Autowired
|
||||
private FriendLinkService friendLinkService;
|
||||
@Autowired
|
||||
private RedisTemplate<Object, Object> redisTemplate;
|
||||
private StringRedisTemplate redisTemplate;
|
||||
|
||||
@GetMapping()
|
||||
@RequiresPermissions("novel:friendLink:friendLink")
|
||||
|
@@ -9,7 +9,7 @@ import com.java2nb.novel.service.NewsService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -32,7 +32,7 @@ public class NewsController {
|
||||
@Autowired
|
||||
private NewsService newsService;
|
||||
@Autowired
|
||||
private RedisTemplate<Object, Object> redisTemplate;
|
||||
private StringRedisTemplate redisTemplate;
|
||||
|
||||
@GetMapping()
|
||||
@RequiresPermissions("novel:news:news")
|
||||
|
Reference in New Issue
Block a user