0

my code

errori.stack.imgur.com/4T1Jl.png

I got Error updating database. Cause java.sql.SQLSyntaxErrorException. The database, [{orderProductQty=3, productCd=4}, {orderProductQty=2, productCd=1}], sent from Service to Dao. but the data's not updating in Mybatis. I don't know the reason why.. so I tried to fixed many times like below. but it's the same. 1, 2, 3. 4, 5.

  • send the parameter notetitle in you post. – pringi Feb 18 '22 at 10:54
  • Does this answer your question? [MissingServletRequestParameterException](https://stackoverflow.com/questions/45683153/missingservletrequestparameterexception) – pringi Feb 18 '22 at 10:54
  • @pringi I've just given require = false , defaultValue = "defaultNotetitle", like somethings but it's the same. I had no idea how to fix... – Nandara Soul Feb 18 '22 at 11:16
  • http://localhost:8080/note/save?notetitle=A&notedescription=B. You see a tutorial over spring web like https://spring.io/guides/gs/serving-web-content/ – pringi Feb 18 '22 at 11:23
  • It's a bad idea to use query parameters for your save method. As you already use a POST request it's better to pass an object to the server using `ModelAttribute`. – Nico Van Belle Feb 23 '22 at 12:36

1 Answers1

0

I think you need to change @RequestParam("notetitle") String notetitle to

@RequestParam(name="notetitle) String notetitle.

vikas
  • 58
  • 6