• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
  • Tim Holloway
  • Carey Brown
  • salvin francis

Cannot insert data including date and image in Spring Boot in Thymleaf

Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have done some couple of exercise about Spring Boot with Thmeleaf as CRUD operation including uploading file , register date except for other things but there is a typo. I couldn't insert information in the database because of not uploading file and register date.

Can you check it if you don't mind. I'll appreciate you if you can help me solve it out.

Here is the error shown below.

Employee Class

Thymleaf Part

Controller Part


Master Rancher
Posts: 4208
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the date, your parser is this:

but the error shows that the date given is this:
The formats do not match.

For the image, lines 10-16 are completely unnecessary, and simply don't do anything other than mess up your byte array.
You have the byte[] from line 8.
That's all you need.
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
professionally read, modify and write PDF files from Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!