Ejemplo n.º 1
0
 /**
  * SEARCH /_search/environments/:query -> search for the environment corresponding to the query.
  */
 @RequestMapping(
     value = "/_search/environments/{query}",
     method = RequestMethod.GET,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public List<Environment> searchEnvironments(@PathVariable String query) {
   return StreamSupport.stream(
           environmentSearchRepository.search(queryStringQuery(query)).spliterator(), false)
       .collect(Collectors.toList());
 }