0
点赞
收藏
分享

微信扫一扫

Mybatis报错 There is no getter for property named xxxx

逸省 2022-06-20 阅读 80
@Update({
"<script>",
"UPDATE service SET",
"`gateway_port`=#{gatewayPort}, ",
"`actor_url`=#{actorUrl}, ",
"`backend_config`=#{backendConfig}, ",
"`ace_config`=#{aceConfig}, ",
"`service_url`=#{serviceUrl}, ",
"`debug_port`=#{debugPort}, ",
"`debug_url`=#{debugUrl}",
"<if test='service.lsPort != null'>",
",`ls_port` = #{lsPort}",
"</if>",
"WHERE id=#{id}",
"</script>"
})
int updateResource(ServerPO service);

Mybatis报错 There is no getter for property named xxxx_sql
解决措施:
加上@Param注解

@Update({
"<script>",
"UPDATE service SET",
"`gateway_port`=#{gatewayPort}, ",
"`actor_url`=#{actorUrl}, ",
"`backend_config`=#{backendConfig}, ",
"`ace_config`=#{aceConfig}, ",
"`service_url`=#{serviceUrl}, ",
"`debug_port`=#{debugPort}, ",
"`debug_url`=#{debugUrl}",
"<if test='service.lsPort != null'>",
",`ls_port` = #{lsPort}",
"</if>",
"WHERE id=#{id}",
"</script>"
})
int updateResource(@Param("service") ServerPO service);


举报

相关推荐

iOS Property getter

0 条评论