Skip to content

Those-Otter-Programs/functional_interface_bean_mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Functional Interface Bean Mapper

Buid Status

Project repository

Description:

Sampling the use of functional interfaces to create a bean mapper.

Features:

  • The project implements a mapper called MemberMapper which is a Functional Interface with two lambda expressions, one to map MemberEntity to MemberResponse and the other way for the second. The MemberService exemplifies how to make use of it.

Controllers


H2:

http://localhost:8080/h2

MemberController

This controller implements 2 actions:

 [GET] /member{id}
 [GET] /members

ROUTES:

/member/{id}

# JSON response:
curl -s -L -X GET 'http://localhost:8080/member/1' | jq

/members - paginated route

# JSON response:
curl -s -L -X GET 'http://localhost:8080/members?page=0&size=8&sort=asc' | jq
curl -s -L -X GET 'http://localhost:8080/members?page=0&size=8' | jq
curl -s -L -X GET 'http://localhost:8080/members?page=0' | jq
curl -s -L -X GET 'http://localhost:8080/members' | jq

Author: James Mallon

License

Apache 2.0


Have a good one


"It's your reaction to adversity, not adversity itself that determines how your life's story will develop." – Dieter F. Uchtdorf.

Releases

No releases published

Packages

No packages published

Languages