@ RequestMapping ( path = "/api" , method = RequestMethod . GET , produces = { "application/hal+json" , "application/json" } ) public HalRepresentation getHomeDocument ( final HttpServletRequest request ) { final String homeUrl = request . getRequestURL ( ) . toString ( ) ; return new HalRepresentation ( linkingTo ( ) . self ( homeUrl ) . single ( linkBuilder ( "search" , "/api/products{?q,embedded}" ) . withTitle ( "Search Products" ) . withType ( "application/hal+json" ) . build ( ) ) . build ( ) ) ; }
Entry point for the products REST API .