For example, the following code
@Query("update BbsPost b set b.content = ?2,b.updateTime = current_timestamp where b.id = ?1")
@Modifying
void updatePostContent(Integer id, String content);
The id and content are attributes of the object Book. Can I define the input parameter as Book, just like
void updatePostContent(Book book);
If possible, how to write my update sql?
漂亮男人2017-05-17 10:06:29
Currently modification operations are not possible, only queries can use SPEL expressions.
Official example: https://spring.io/blog/2014/0...