課程
/后端開發
/Java
/2小時學會Spring Boot
使用更新操作的時候不會更新,而是插入了,不知道怎么回事。
2017-07-04
源自:2小時學會Spring Boot 5-2
正在回答
不需要用,這樣就行,
@RequestMapping("/delete")public String ?deleteTest(Integer ?id ){ ? ?list.delete(id); ? ?return null;}@RequestMapping("/addTest")public Test insertTest(Integer id ,String name){ ? ?Test test=new Test(); ? ?test.setId(id); ? ?test.setName(name); ?return list.save(test);}
不應該啊,4.3.9都沒有顯示被棄用
注解已棄用
qq_安靜聽歌不調皮不搗蛋_0 提問者
舉報
Spring Boot入門視頻教程,你將學會使用Spring Boot快速構建應用程序
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2017-08-17
不需要用,這樣就行,
@RequestMapping("/delete")
public String ?deleteTest(Integer ?id ){
? ?list.delete(id);
? ?return null;
}
@RequestMapping("/addTest")
public Test insertTest(Integer id ,String name){
? ?Test test=new Test();
? ?test.setId(id);
? ?test.setName(name);
?return list.save(test);
}
2017-07-12
不應該啊,4.3.9都沒有顯示被棄用
2017-07-04
注解已棄用