首页 > TAG信息列表 > userInDto

JPA更新操作手写SQL 传入vo或者dto对象

1.JPA手写sql进行更新操作(解析实体类) 添加注解 @Modifying @Transactional 开启原生sql,nativeQuery = true 接口参数添加@Param注解指定别名 编写sql语句 :#{#userInDto.userName} 数据绑定占位使用 :#{#实体类.属性} /* 手写sql进行更新用户操作 */ @Modifying @Tr