|
@@ -4,6 +4,7 @@ import com.base.utils.Result;
|
|
|
import com.content.domain.po.Swipper;
|
|
import com.content.domain.po.Swipper;
|
|
|
import com.content.service.ISwipperService;
|
|
import com.content.service.ISwipperService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.security.core.context.SecurityContextHolder;
|
|
import org.springframework.security.core.context.SecurityContextHolder;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -24,6 +25,7 @@ public class SwipperController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISwipperService swipperService;
|
|
private ISwipperService swipperService;
|
|
|
@GetMapping("/swipper")
|
|
@GetMapping("/swipper")
|
|
|
|
|
+ @PreAuthorize("hasRole('ROLE_USER')")
|
|
|
public Result<List<Swipper>> findRecommend(){
|
|
public Result<List<Swipper>> findRecommend(){
|
|
|
List<Swipper> list = swipperService.list();
|
|
List<Swipper> list = swipperService.list();
|
|
|
// 添加调试信息
|
|
// 添加调试信息
|