| package com.wzy.serviceedu.controller;

    import com.wzy.serviceedu.entity.EduTeacher;
    import com.wzy.serviceedu.service.EduTeacherService;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.RequestMapping;

    import org.springframework.web.bind.annotation.RestController;

    import java.util.List;

    /


    讲师 前端控制器



    *
    @author wzy
    *
    @since 2021-09-10
    */
    @RestController
    @RequestMapping(
    “/serviceedu/teacher”)
    public class **EduTeacherController {

    1. @Autowired<br /> **private **EduTeacherService **eduTeacherService**;<br /> //http://localhost:8001/serviceedu/teacher/findAll<br /> @GetMapping(value = **"/findAll"**)<br /> **public **List<EduTeacher> findAllTeacher(){<br /> //调用service中的list方法,传入null值查询所有的数据<br /> List<EduTeacher> list = **eduTeacherService**.list(**null**);<br /> **return **list;<br /> }

    } | | —- |