写update原生sql语句,与查询语句的注解不同,除了**@Query**,还需要两个额外注解 @Modifying @Transactional
@Modifying
@Transactional
@Query(value = "update tablename set columnname = 'xxx' where id =?1", nativeQuery = true)
void functionName(UUID id);
写update原生sql语句,与查询语句的注解不同,除了**@Query**,还需要两个额外注解 @Modifying @Transactional
@Modifying
@Transactional
@Query(value = "update tablename set columnname = 'xxx' where id =?1", nativeQuery = true)
void functionName(UUID id);