@Modifying
@Transactional
@Query("update AddressEntity addr set addr.defaulted = false where addr.user.userID = :userID" +
" and addr.id <> :id")
void setOtherAddressNotDefault(@Param("userID")Long userID, @Param("id")Long id);
其中,@Modifying和@Transactional必须有