package com.prj.controller; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.prj.entity.Teacher; import com.prj.server.TerServer; @Controller public class TerController { @Resource private TerServer terserver; @RequestMapping("/queryTerController") public String queryTer(Model model){ model.addAttribute("terList", terserver.queryTer()); return "/index.jsp"; } @RequestMapping(value="/addTeacherController",method=RequestMethod.POST) public String addTeacher(Teacher teacher){ terserver.addTeacher(teacher); return "redirect:/queryTerController"; } @RequestMapping(value="/findByIdController") public String findByIdStu(HttpServletRequest request, int tid){ request.setAttribute("terlist", terserver.findById(tid)); return "/update.jsp"; } @RequestMapping(value="/updateTeacherController",method=RequestMethod.POST) public String updateTeacher(Teacher teacher){ terserver.updateTeacher(teacher); return "redirect:/queryTerController"; } @RequestMapping(value="/deleteByIdTerController") public String deleteById(int tid){ terserver.deleteById(tid); return "redirect:/queryTerController"; } }
最近下载更多
血羽如风 LV4
1月25日
768881787 LV7
2023年12月25日
wwwww816 LV3
2023年12月19日
zhumeng168 LV5
2023年7月8日
6389181 LV7
2023年5月31日
yeyuuu LV6
2023年5月20日
187331 LV3
2022年11月27日
不想吃菠菜的1212333 LV1
2022年11月26日
天士大夫 LV2
2022年11月14日
仙女le LV3
2022年8月18日
最近浏览更多
血羽如风 LV4
1月25日
微信网友_6816301584912384 LV1
1月10日
沈从文 LV2
1月1日
微信网友_6802139027345408 LV2
2023年12月31日
768881787 LV7
2023年12月25日
爱吃鱼的水獭
2023年12月21日
暂无贡献等级
yolo_light LV1
2023年12月20日
wwwww816 LV3
2023年12月19日
xiongwei11231 LV8
2023年12月6日
mds123456 LV2
2023年11月3日