DEV Community

Domenico Rizzo
Domenico Rizzo

Posted on

3 1

[HELP] Spring Boot: field is not set in request

I'm learning Spring Boot. My learning project is in this repository github.

I have this controller where in the method createTodo I have as RequestBody this dto where I have the problem that only the field "when" is not filled properly when I make a post on that controller route.
I tried to insert a log but I didn't succeed. I don't know why all the other field are filled and only "when" not.
This is an example of the body to the call at such route:

{
"what": "Buy bread",
"when": "2022-06-01 19:00:00",
"where": "To the grocery store"
}

Billboard image

Imagine monitoring that's actually built for developers

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (3)

Collapse
 
maddy profile image
Maddy

Just saw this! Have you managed to solve this in the end?

Collapse
 
willypuzzle profile image
Domenico Rizzo

Yes, I filled the field with the wrong date format and it lanched an exception.

Collapse
 
maddy profile image
Maddy

Nice! 😁👏🏾

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay