class TodoController {

    @RequestMapping(value = "/search", method = RequestMethod.GET)
    public Page<TodoDTO> findBySearchTerm(@RequestParam("searchTerm") String searchTerm, Pageable pageable) {
        LOGGER.info("Finding {} todo entries for page {} by using search term: {}",
                pageable.getPageSize(),
                pageable.getPageNumber(),
                searchTerm
        );

        Page<TodoDTO> todoEntries = searchService.findBySearchTerm(searchTerm, pageable);

        LOGGER.info("Found {} todo entries for page: {}",
                todoEntries.getNumberOfElements(),
                todoEntries.getNumber()
        );

        return todoEntries;
    }

    @Autowired public  TodoController(TodoCrudService crudService, TodoSearchService searchService);

}