Skip to content

Sample Spring boot application to test how to map request params in a DTO

Notifications You must be signed in to change notification settings

pleymor/test-request-params-to-dto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it ?

This spring boot application contains 2 APIs to test how input can be mapped to DTO by Spring.

test of RequestBody params to DTO:

curl -i -X POST \
   -H "Content-Type:application/json" \
   -d \
'{"a":"azaz"}' \
 'http://localhost:8500/api/test'

returns:

{"a":"azaz"}

test of RequestMapping params to DTO:

curl -i -X GET \
   -H "Content-Type:application/json" \
 'http://localhost:8500/api/test?a=azaz'

returns:

{"a":null}

About

Sample Spring boot application to test how to map request params in a DTO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published