新
RabbitMQ
精讲 提升工程实践能力 培养架构思维
V:ititit111222333
public class StuController {
@Autowired
private StuService stuService;
@GetMapping("get-by-id/{id}")
private Stu getById(@PathVariable("id") int id) {
return stuService.getById(id);
}
@GetMapping("insert-by-stu")
private Integer insertByStu() {
Stu stu1 = new Stu();
stu1.setAge(1);
stu1.setName("我");
return stuService.insertByStu(stu1);
}
@GetMapping("update-by-stu")
private Integer updateByStu() {
Stu stu1 = new Stu();
stu1.setId(1211);
stu1.setAge(1);
stu1.setName("我");
return stuService.updateByStu(stu1);
}
@GetMapping("delete-by-id/{id}")
private Integer updateByStu(@PathVariable("id") int id) {
return stuService.deleteById(id);
}
}