最近跟着黑马学springboot,出现了如下问题暂未找到原因,求大佬看看:
问题:点击部门管理无响应但是postman 请求到了数据,在页面检查中也获取到了数据,不知道为什么前端页面没有数据。
请求员工管理,按F12检查发现同时请求了部门和员工两份数据
点击部门管理后却没有数据,这是为什么呀?明明请求到了数据了。
这是DeptController的代码:
package com.example.springbootlern2.controller;
import com.example.springbootlern2.pojo.Dept;
import com.example.springbootlern2.pojo.Emp;
import com.example.springbootlern2.pojo.Result;
import com.example.springbootlern2.sevice.DeptService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@