@恒宇少年
public UserEntity save(@RequestParam(value = "name") String name,
@RequestParam(value = "age") int age,
@RequestParam(value = "address") String address) {
UserEntity Entity=new UserEntity();
Entity.setT_name(name);
Entity.setT_age(age);
Entity.setT_address(address);
return userJpa.save(Entity);
}
這是我改的save方法,需要用RequestParam獲取參數(shù)树埠,請(qǐng)問(wèn)不用RequestParam是怎么實(shí)現(xiàn)參數(shù)獲取的?
第三章:SpringBoot使用SpringDataJPA完成CRUD前兩章我們簡(jiǎn)單講解了SpringBoot的易用性弥奸,SpringBoot框架內(nèi)部提供了很多我們需要用到的組件榨惠,需要什么你就可以拿到項(xiàng)目里盛霎。在我們平時(shí)的項(xiàng)目中,數(shù)據(jù)的存儲(chǔ)以及訪問(wèn)...