最新回答 / 隨塵軟件
你要添加事務(wù)注解:@Transactional????@Modifying????@Query(value="insert into jpa_person(id,name,gender,birth) values(?,?,?,?)",nativeQuery=true)????public int insertPerson2(Integer id,String name,Integer gender,Date birth);
2017-12-16
想起當(dāng)初手動(dòng)構(gòu)建Pager<T t>對(duì)象封裝分頁對(duì)象,嗚嗚嗚,jpa方便了好多,大贊。
2017-12-15
IntelliJ IDEA有自動(dòng)提示方法名的功能,熟悉方法名的規(guī)范之后就o啦。
2017-12-14
xml太繁重,SpringBoot實(shí)在太好用了。。。大家有空可以去學(xué)習(xí)下SpringBoot,再結(jié)合SpringCloud一起學(xué)習(xí)下。
2017-12-14
傳統(tǒng)的方式代碼相對(duì)冗余,有了jpa repository會(huì)方便許多,簡(jiǎn)單的crud可以直接繼承CrudRepository,JpaRepository等。