package com.sf.controller; import com.sf.entity.BookInfo; import com.sf.service.IBookInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** *

* 小说信息 前端控制器 *

* * @author baomidou * @since 2024-05-25 */ @RestController @RequestMapping("/bookInfo") public class BookInfoController { @Autowired private IBookInfoService bookInfoService; // http://localhost:8888/bookInfo/list @GetMapping("/list") public List list(){ // 不需要编写sql语句 直接进行增删改查操作 return bookInfoService.list(); } }