これはこれはこれは、URLデータベース私はpwaSourceIdでゼロになっているのですが、私は13フォームのURLも渡しています。私もコントローラで印刷しています。
pwaSourceId-int
name-varchar
isDeleted-int
createdBy-int
createdTime-Timestamp
modifiedBy-int
modifiedTime-Timestamp
で
ある
@RequestMapping(value="/update",method = RequestMethod.PUT)
public void updateEmployeee(@ModelAttribute("PwaSourceDetails") PwaSourceDetails pwa1)
{
System.out.println("pwa1.getPwaSourceID()"); //out is zero here also
pwaSourceDetailsService.updatePwaSourceDetails(pwa1);
}
私のコントローラクラスである
public int updatePwaSourceDetails(PwaSourceDetails pwa){System.out.println("pwa.getPwaSourceID()"); //out is zero here
String query="update pwa_source set name='"+pwa.getName()+"',is_deleted='"+pwa.getIsDeleted()+"',created_by='"+pwa.getCreatedBy()+"',created_time='"+pwa.getCreatedTime()+"',modified_by='"+pwa.getModifiedBy()+"',modified_time='"+pwa.getModifiedTime()+"' where pwa_source_id="+pwa.getPwaSourceID()+"";
return jdbcTemplate.update(query);
}
私Dao.javaクラスです
これは、私はあなたがGETリクエストのように、URLにパラメータを送信
root cause
org.springframework.jdbc.BadSqlGrammarException: StatementCallback;
bad SQL grammar [update pwa_source set name='nitish',is_deleted=0,created_by=1,created_time=,modified_by=1,modified_time= where pwa_source_id=0];
nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
'modified_by=1,modified_time= where pwasourceid=0' at line 1
以下のようなJSONのデータは私が – NITISH
はあなたが 'PwaSourceDetails'のソースコードを提供することができ、まだも得る同じ結果とそれを使用していますか? –