Java 类org.springframework.web.bind.annotation.GetMapping 实例源码

项目:Spring-Security-Third-Edition    文件:LoginController.java   
@GetMapping(value = "/login")
public ModelAndView login(
        @RequestParam(value = "error", required = false) String error,
        @RequestParam(value = "logout", required = false) String logout) {

    logger.info("******login(error): {} ***************************************", error);
    logger.info("******login(logout): {} ***************************************", logout);

    ModelAndView model = new ModelAndView();
    if (error != null) {
        model.addObject("error", "Invalid username and password!");
    }

    if (logout != null) {
        model.addObject("message", "You've been logged out successfully.");
    }
    model.setViewName("login");

    return model;

}
项目:mongodb-file-server    文件:FileController.java   
/**
 * 在线显示文件
 * @param id
 * @return
 */
@GetMapping("/view/{id}")
@ResponseBody
public ResponseEntity<Object> serveFileOnline(@PathVariable String id) {

    File file = fileService.getFileById(id);

    if (file != null) {
        return ResponseEntity
                .ok()
                .header(HttpHeaders.CONTENT_DISPOSITION, "fileName=\"" + file.getName() + "\"")
                .header(HttpHeaders.CONTENT_TYPE, file.getContentType() )
                .header(HttpHeaders.CONTENT_LENGTH, file.getSize()+"")
                .header("Connection",  "close") 
                .body( file.getContent());
    } else {
        return ResponseEntity.status(HttpStatus.NOT_FOUND).body("File was not fount");
    }

}
项目:Learning-Spring-Boot-2.0-Second-Edition    文件:HomeController.java   
@GetMapping(value = BASE_PATH + "/" + FILENAME + "/raw",
    produces = MediaType.IMAGE_JPEG_VALUE)
@ResponseBody
public Mono<ResponseEntity<?>> oneRawImage(
    @PathVariable String filename) {
    // tag::try-catch[]
    return imageService.findOneImage(filename)
        .map(resource -> {
            try {
                return ResponseEntity.ok()
                    .contentLength(resource.contentLength())
                    .body(new InputStreamResource(
                        resource.getInputStream()));
            } catch (IOException e) {
                return ResponseEntity.badRequest()
                    .body("Couldn't find " + filename +
                        " => " + e.getMessage());
            }
        });
    // end::try-catch[]
}
项目:cas-5.1.0    文件:WSFederationValidateRequestController.java   
/**
 * Handle federation request.
 *
 * @param response the response
 * @param request  the request
 * @throws Exception the exception
 */
@GetMapping(path = WSFederationConstants.ENDPOINT_FEDERATION_REQUEST)
protected void handleFederationRequest(final HttpServletResponse response, final HttpServletRequest request) throws Exception {
    final WSFederationRequest fedRequest = WSFederationRequest.of(request);
    switch (fedRequest.getWa().toLowerCase()) {
        case WSFederationConstants.WSIGNOUT10:
        case WSFederationConstants.WSIGNOUT_CLEANUP10:
            handleLogoutRequest(fedRequest, request, response);
            break;
        case WSFederationConstants.WSIGNIN10:
            handleInitialAuthenticationRequest(fedRequest, response, request);
            break;
        default:
            throw new UnauthorizedAuthenticationException("The authentication request is not recognized",
                    Collections.emptyMap());
    }
}
项目:Learning-Spring-Boot-2.0-Second-Edition    文件:UploadController.java   
@GetMapping(value = BASE_PATH + "/" + FILENAME + "/raw",
    produces = MediaType.IMAGE_JPEG_VALUE)
@ResponseBody
public Mono<ResponseEntity<?>> oneRawImage(
    @PathVariable String filename) {
    // tag::try-catch[]
    return imageService.findOneImage(filename)
        .map(resource -> {
            try {
                return ResponseEntity.ok()
                    .contentLength(resource.contentLength())
                    .body(new InputStreamResource(
                        resource.getInputStream()));
            } catch (IOException e) {
                return ResponseEntity.badRequest()
                    .body("Couldn't find " + filename +
                        " => " + e.getMessage());
            }
        });
    // end::try-catch[]
}
项目:Spring-Security-Third-Edition    文件:LoginController.java   
@GetMapping(value = "/login")
public ModelAndView login(
        @RequestParam(value = "error", required = false) String error,
        @RequestParam(value = "logout", required = false) String logout) {

    logger.info("******login(error): {} ***************************************", error);
    logger.info("******login(logout): {} ***************************************", logout);

    ModelAndView model = new ModelAndView();
    if (error != null) {
        model.addObject("error", "Invalid username and password!");
    }

    if (logout != null) {
        model.addObject("message", "You've been logged out successfully.");
    }
    model.setViewName("login");

    return model;

}
项目:SaleWeb    文件:SaleWebController.java   
@GetMapping("/articulo/{id}")
public String verArticulo (Model model, @PathVariable long id,HttpServletRequest request){

    Articulo articulo = articulo_repository.findOne(id);
    model.addAttribute("articulo", articulo);
    model.addAttribute("comentarios",comentario_repository.findByArticulo(articulo));
    model.addAttribute("admin",request.isUserInRole("ADMIN"));

    return "ver_articulo";
}
项目:open-kilda    文件:SwitchController.java   
/**
 * Get all available links.
 *
 * @return list of links.
 */
@ApiOperation(value = "Get all available switches", response = SwitchDto.class)
@ApiResponses(value = {
        @ApiResponse(code = 200, response = FlowPayload.class, message = "Operation is successful"),
        @ApiResponse(code = 400, response = MessageError.class, message = "Invalid input data"),
        @ApiResponse(code = 401, response = MessageError.class, message = "Unauthorized"),
        @ApiResponse(code = 403, response = MessageError.class, message = "Forbidden"),
        @ApiResponse(code = 404, response = MessageError.class, message = "Not found"),
        @ApiResponse(code = 500, response = MessageError.class, message = "General error"),
        @ApiResponse(code = 503, response = MessageError.class, message = "Service unavailable")})
@GetMapping(path = "/switches")
@ResponseStatus(HttpStatus.OK)
public List<SwitchDto> getSwitches() {
    return switchService.getSwitches();
}
项目:itweet-boot    文件:EffeController.java   
@GetMapping(value = "/tweet/{year}/{month}/{day}/{title}")
public String tweetSingle(@PathVariable("year") Integer year,@PathVariable("month") Integer month,@PathVariable("day") Integer day,@PathVariable("title") String title, Model model) {
    model.addAttribute("tweet","selected");

    Article article = articleService.getArticleByTitle(title);
    model.addAttribute("article",article);

    List<String> tagsList = articleService.getArticleTagsByArticleId(article.getId());
    model.addAttribute("tagsList",tagsList.toString());

    return "front/theme/effe/tweetSingle";
}
项目:EntityGenerator    文件:EntityGenApplication.java   
@GetMapping(value = "get_class_file")
public void getClassFile(@RequestParam List<String> tableNames,
                         @RequestParam String url,
                         @RequestParam String userName,
                         @RequestParam String password,
                         @RequestParam(required = false) String pkgName,
                         HttpServletResponse response) throws SQLException, IOException {
    Connection conn = getConn(url, userName, password);
    Map<String, List<String>> nameWithJavaMap = getStringListMap(tableNames, conn, pkgName);
    conn.close();

    ServletOutputStream outputStream = response.getOutputStream();
    ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream);


    for (Map.Entry<String, List<String>> stringListEntry : nameWithJavaMap.entrySet()) {
        zipOutputStream.putNextEntry(
                new ZipEntry(
                        getJavaClassName(stringListEntry.getKey()) + ".java"
                )
        );
        for (String line : stringListEntry.getValue()) {
            zipOutputStream.write(line.getBytes());
            zipOutputStream.write('\n');
        }
    }
    response.setContentType("application/zip;charset=utf-8");
    response.setHeader("Content-disposition", "attachment;filename= " + LocalDateTime.now().format(DateTimeFormatter.BASIC_ISO_DATE) + ".zip");
    zipOutputStream.close();

}
项目:xmanager    文件:UserController.java   
/**
 * 编辑用户页
 *
 * @param id
 * @param model
 * @return
 */
@GetMapping("/editPage")
public String editPage(Model model, Long id) {
    UserVo userVo = userService.selectVoById(id);
    List<Role> rolesList = userVo.getRolesList();
    List<Long> ids = new ArrayList<Long>();
    for (Role role : rolesList) {
        ids.add(role.getId());
    }
    model.addAttribute("roleIds", ids);
    model.addAttribute("user", userVo);
    return "admin/user/userEdit";
}
项目:Spring-Security-Third-Edition    文件:DefaultController.java   
@GetMapping("/default")
public String defaultAfterLogin(HttpServletRequest request) {
    if (request.isUserInRole("ROLE_ADMIN")) {
        return "redirect:/events/";
    }
    return "redirect:/";
}
项目:Spring-Security-Third-Edition    文件:DefaultController.java   
@GetMapping("/default")
public String defaultAfterLogin(HttpServletRequest request) {
    if (request.isUserInRole("ROLE_ADMIN")) {
        return "redirect:/events/";
    }
    return "redirect:/";
}
项目:setra    文件:ReceiveController.java   
/**
 * Receive non-password protected message.
 */
@GetMapping("/confirm/{id:[a-f0-9]{64}}")
public String confirm(
        @PathVariable("id") final String id,
        @ModelAttribute("linkSecret") final String linkSecret,
        final Model model,
        final HttpSession session) {

    prepareMessage(id, linkSecret, null, model, session);

    return FORM_MSG_DISPLAY;
}
项目:Spring-Boot-Examples    文件:ConsumerController.java   
@GetMapping("/")
ResponseEntity<String> showCodeCouple(){
    HttpHeaders headers = new HttpHeaders();
    headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
    HttpEntity<?> entity = new HttpEntity<>(headers);
    return restTemplate.exchange(
            "http://producer-service/",
            HttpMethod.GET,
            entity,
            String.class);
}
项目:swordfish-service    文件:UserQueryGatewayRestController.java   
@GetMapping("/users")
public ResponseEntity<String> users() {
    ParameterizedTypeReference<String> reference = new ParameterizedTypeReference<String>() {
    };

    return restTemplate.exchange(SERVICE, HttpMethod.GET, authenticationService.addAuthenticationHeader(), reference);
}
项目:karate    文件:HeadersController.java   
@GetMapping("/{token:.+}")
public ResponseEntity validateToken(@CookieValue("time") String time,
        @RequestHeader("Authorization") String[] authorization, @PathVariable String token,
        @RequestParam String url) {
    String temp = tokens.get(token);
    String auth = authorization[0];
    if (auth.equals("dummy")) {
        auth = authorization[1];
    }
    if (temp.equals(time) && auth.equals(token + time + url)) {
        return ResponseEntity.ok().build();
    } else {
        return ResponseEntity.badRequest().build();
    }
}
项目:setra    文件:ReceiveController.java   
/**
 * Download attached file.
 */
@GetMapping("/file/{id:[a-f0-9]{64}}/{key:[a-f0-9]{64}}")
public ResponseEntity<StreamingResponseBody> file(@PathVariable("id") final String id,
                                                  @PathVariable("key") final String keyHex,
                                                  final HttpSession session) {

    final KeyIv keyIv =
        new KeyIv(BaseEncoding.base16().lowerCase().decode(keyHex), resolveFileIv(id, session));

    final DecryptedFile decryptedFile = messageService.resolveStoredFile(id, keyIv);

    final HttpHeaders headers = new HttpHeaders();

    // Set application/octet-stream instead of the original mime type to force download
    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);

    if (decryptedFile.getName() != null) {
        headers.setContentDispositionFormData("attachment", decryptedFile.getName(),
            StandardCharsets.UTF_8);
    }
    headers.setContentLength(decryptedFile.getOriginalFileSize());

    final StreamingResponseBody body = out -> {
        try (final InputStream in = messageService.getStoredFileInputStream(id, keyIv)) {
            ByteStreams.copy(in, out);
            out.flush();
        }

        messageService.burnFile(id);
    };

    return new ResponseEntity<>(body, headers, HttpStatus.OK);
}
项目:scoold    文件:SearchController.java   
@GetMapping(path = "/feed.xml", produces = MediaType.APPLICATION_ATOM_XML)
public void feed(HttpServletRequest req, Writer writer) {
    try {
        new SyndFeedOutput().output(getFeed(), writer);
    } catch (Exception ex) {
        logger.error("Could not generate feed", ex);
    }
}
项目:dynamic-data-source-demo    文件:BaseCodeController.java   
/**
 * 没有事务,手动指定数据源使用主库
 */
@GetMapping("/get/slave/{code}/{officeAddress}")
public ResponseEntity<List<BaseCode>> listSlave(@PathVariable String code,
                                                @PathVariable Integer officeAddress) {
    EnumBaseCode type = EnumBaseCode.getByCode(code);
    Optional<List<BaseCode>> optional = baseCodeService.getListByCity(type, officeAddress);
    return ResponseEntity.ok(optional.orElseThrow(IllegalArgumentException::new));
}
项目:cas-5.1.0    文件:WSFederationMetadataController.java   
/**
 * Get Metadata.
 *
 * @param request  the request
 * @param response the response
 * @throws Exception the exception
 */
@GetMapping(path = WSFederationConstants.ENDPOINT_FEDERATION_METADATA)
public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    try {
        response.setContentType(MediaType.TEXT_HTML_VALUE);
        final PrintWriter out = response.getWriter();
        final WSFederationMetadataWriter mw = new WSFederationMetadataWriter();

        final Document metadata = mw.produceMetadataDocument(casProperties);
        out.write(DOM2Writer.nodeToString(metadata));
    } catch (final Exception ex) {
        LOGGER.error("Failed to get metadata document", ex);
        response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }
}
项目:devoxxus-jhipster-microservices-demo    文件:SshResource.java   
/**
 * GET  / : get the SSH public key
 */
@GetMapping(value = "/ssh/public_key", produces = MediaType.TEXT_PLAIN_VALUE)
@Timed
public ResponseEntity<String> eureka() {
    try {
        String publicKey = new String(Files.readAllBytes(
            Paths.get(System.getProperty("user.home") + "/.ssh/id_rsa.pub")));

        return new ResponseEntity<>(publicKey, HttpStatus.OK);
    } catch (IOException e) {
        log.warn("SSH public key could not be loaded: {}", e.getMessage());
        return new ResponseEntity<>("", HttpStatus.NOT_FOUND);
    }
}
项目:cas-5.1.0    文件:OidcJwksEndpointController.java   
/**
 * Handle request for jwk set.
 *
 * @param request  the request
 * @param response the response
 * @param model    the model
 * @return the jwk set
 * @throws Exception the exception
 */
@GetMapping(value = '/' + OidcConstants.BASE_OIDC_URL + '/' + OidcConstants.JWKS_URL, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> handleRequestInternal(final HttpServletRequest request,
                                                    final HttpServletResponse response,
                                                    final Model model) throws Exception {

    Assert.notNull(this.jwksFile, "JWKS file cannot be undefined or null.");

    try {
        final String jsonJwks = IOUtils.toString(this.jwksFile.getInputStream(), StandardCharsets.UTF_8);
        final JsonWebKeySet jsonWebKeySet = new JsonWebKeySet(jsonJwks);

        this.servicesManager.getAllServices()
                .stream()
                .filter(s -> s instanceof OidcRegisteredService && StringUtils.isNotBlank(((OidcRegisteredService) s).getJwks()))
                .forEach(
                        Unchecked.consumer(s -> {
                            final OidcRegisteredService service = (OidcRegisteredService) s;
                            final Resource resource = this.resourceLoader.getResource(service.getJwks());
                            final JsonWebKeySet set = new JsonWebKeySet(IOUtils.toString(resource.getInputStream(), StandardCharsets.UTF_8));
                            set.getJsonWebKeys().forEach(jsonWebKeySet::addJsonWebKey);
                        }));
        final String body = jsonWebKeySet.toJson(JsonWebKey.OutputControlLevel.PUBLIC_ONLY);
        response.setContentType(MediaType.APPLICATION_JSON_VALUE);
        return new ResponseEntity<>(body, HttpStatus.OK);
    } catch (final Exception e) {
        LOGGER.error(e.getMessage(), e);
        return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST);
    }
}
项目:cas-5.1.0    文件:ManageRegisteredServicesMultiActionController.java   
/**
 * Gets services.
 *
 * @param response the response
 */
@GetMapping(value = "/getServices")
public void getServices(final HttpServletResponse response) {
    ensureDefaultServiceExists();
    final Map<String, Object> model = new HashMap<>();
    final List<RegisteredServiceViewBean> serviceBeans = new ArrayList<>();
    final List<RegisteredService> services = new ArrayList<>(this.servicesManager.getAllServices());
    serviceBeans.addAll(services.stream().map(this.registeredServiceFactory::createServiceViewBean).collect(Collectors.toList()));
    model.put("services", serviceBeans);
    model.put(STATUS, HttpServletResponse.SC_OK);
    JsonUtils.render(model, response);
}
项目:jhipster-microservices-example    文件:AccountResource.java   
/**
 * GET  /authenticate : check if the user is authenticated, and return its login.
 *
 * @param request the HTTP request
 * @return the login if the user is authenticated
 */
@GetMapping("/authenticate")
@Timed
public String isAuthenticated(HttpServletRequest request) {
    log.debug("REST request to check if the current user is authenticated");
    return request.getRemoteUser();
}
项目:NutriBuddi    文件:UserController.java   
@GetMapping(path="/updateUser") // Map ONLY GET Requests
@ResponseBody
public ResponseEntity<Object> updateUser (@RequestParam String email
        , @RequestParam String password
        , @RequestParam String password2
        , @RequestParam String height
        , @RequestParam String weight
        , @RequestParam String age
        , @RequestParam String gender) {

       UserVO userVO = new UserVO(email, password, password2, height, weight, age, gender, userRepository);
    ArrayList<ValidationRule> rules = new ArrayList<>();
    rules.add(new UpdateEmailValidationRule());
    rules.add(new PasswordValidationRule());
    rules.add(new HeightValidationRule());
    rules.add(new WeightValidationRule());
    rules.add(new AgeValidationRule());
    rules.add(new GenderValidationRule());

    ValidationResponse validationResponse;

    for(ValidationRule rule: rules){
        validationResponse = rule.validate(userVO);
        LOG.info(validationResponse.toString());
        if(!validationResponse.getStatus().is2xxSuccessful()){
            LOG.info("Status failure: " + validationResponse.getStatus());
            return new ResponseEntity<>(validationResponse.getResponseBody(), validationResponse.getStatus());
        }
    }

    User user = userRepository.findByEmail(email);
    user.setPassword(password);
    user.setHeight(Integer.parseInt(height));
    user.setWeight(Integer.parseInt(weight));
    user.setAge(Integer.parseInt(age));
    user.setGender(gender);
    userRepository.save(user);
    return new ResponseEntity<>("User Updated", HttpStatus.OK);
}
项目:KPBlog    文件:HomeController.java   
@GetMapping("/")
public String index(Model model) {
    List<Article> articles = this.articleRepository.findAll();
    model.addAttribute("view", "home/index");
    model.addAttribute("articles", articles);
    return "base-layout";
}
项目:OMIPlatform    文件:OfficialResouceController.java   
/**
 * 官网首页数据展示
 *
 * @return
 */
@GetMapping("/index")
public String index(HttpServletRequest request, Model model, HttpSession session) {

    Integer newpv = (Integer) session.getAttribute("is_new");
    if (newpv == null) {
        TzPv pv = new TzPv();
        pv.setUserip(Utils.getIpAddress(request));
        pv.setUseragent(request.getHeader("User-Agent"));
        pv.setVisittime(new Timestamp(System.currentTimeMillis()));
        pv.setModule(3);
        this.tzPvService.insert(pv);
        session.setAttribute("is_new", 1);
    }

    //获取导航菜单资源
    List<OfficialResouce> menus = officialResouceService.findResourceByCid(1, 0, 4);
    //轮播图获取
    List<OfficialResouce> carousels = officialResouceService.findResourceByCid(2, 0, 4);
    //公司展示图片获取
    List<OfficialResouce> companyPic = officialResouceService.findResourceByCid(3, 0, 3);
    //新闻中心截图获取
    List<OfficalNews> news = officalNewsService.findNewsByCid(13, 0, 5);
    //视频
    List<OfficalNews> videos = officalNewsService.findNewsByCid(14, 0, 6);

    List<OfficalNews> notices = officalNewsService.findNewsByCid(15, 0, 3);

    List<OfficialResouce> lovePics = officialResouceService.findResourceByCid(10, 0, 6);

    session.setAttribute("menu", menus);
    model.addAttribute("carousels", carousels);
    model.addAttribute("companyPic", companyPic);
    model.addAttribute("lovePics", lovePics);
    model.addAttribute("videos", videos);
    model.addAttribute("news", news);
    model.addAttribute("notices", notices);
    return "index";
}
项目:Mastering-Spring-5.0    文件:TodoController.java   
@GetMapping(path = "/users/{name}/todos/{id}")
public Resource<Todo> retrieveTodo(@PathVariable String name, @PathVariable int id) {
    Todo todo = todoService.retrieveTodo(id);
    if (todo == null) {
        throw new TodoNotFoundException("Todo Not Found");
    }

    Resource<com.mastering.spring.springboot.bean.Todo> todoResource = new Resource<com.mastering.spring.springboot.bean.Todo>(todo);
    ControllerLinkBuilder linkTo = linkTo(methodOn(this.getClass()).retrieveTodos(name));
    todoResource.add(linkTo.withRel("parent"));
    return todoResource;
}
项目:pds    文件:ApiTestController.java   
/**
 * 获取用户信息
 */
@GetMapping("userInfo")
@ApiOperation(value = "获取用户信息")
@ApiImplicitParam(paramType = "header", name = "token", value = "token", required = true)
public R userInfo(@LoginUser UserEntity user){
    return R.ok().put("user", user);
}
项目:nitrite-database    文件:HomeController.java   
@GetMapping("/")
public String home(Model model) {
    if (userAccountService.isNoUserFound()) {
        model.addAttribute("userAccount", new UserAccount());
        return "signUp";
    } else {
        return "redirect:/admin/";
    }
}
项目:Microservices-with-JHipster-and-Spring-Boot    文件:EurekaResource.java   
/**
 * GET  /eureka/applications : get Eureka applications information
 */
@GetMapping("/eureka/applications")
@Timed
public ResponseEntity<EurekaDTO> eureka() {
    EurekaDTO eurekaDTO = new EurekaDTO();
    eurekaDTO.setApplications(getApplications());
    return new ResponseEntity<>(eurekaDTO, HttpStatus.OK);
}
项目:openshift-workshop    文件:FrontendController.java   
@GetMapping(path = "/users/{id}")
public Mono<Person> get(@PathVariable("id") String uuid) {
  return this.client
      .get().uri(getReadURL() + "/api/users/", uuid)
      .accept(MediaType.APPLICATION_JSON)
      .exchange()
      .flatMap(resp -> resp.bodyToMono(Person.class));
}
项目:spring-five-functional-reactive    文件:EventController.java   
@GetMapping(path = "/events", produces = { //
        MediaType.APPLICATION_STREAM_JSON_VALUE, //
        MediaType.TEXT_EVENT_STREAM_VALUE //
})
Flux<Event> streamEvents() {
    return eventRepository.findPeopleBy();
}
项目:MoviesSearchPos    文件:IndexController.java   
@GetMapping("/consulta")
public ModelAndView consulta(@RequestParam("titulo") String titulo, @RequestParam("desc") String desc, @RequestParam("ano") Integer ano) {
    ModelAndView mav = new ModelAndView("/consulta");
    mav.addObject("listaFilmes", filmes.getSearchFilmes(titulo, desc, ano));
    System.out.println("Passando por consulta");
    return mav;
}
项目:product-management-system    文件:UserController.java   
/**
 * Return json-information about all users in database.
 */
@GetMapping
@ResponseStatus(HttpStatus.OK)
public List<UserDto> loadAllUsers() {
    log.info("Start loadAllUsers");
    return userService.findAll().stream()
            .map(user -> mapper.map(user, UserDto.class))
            .collect(toList());
}
项目:Building-Web-Apps-with-Spring-5-and-Angular    文件:DoctorSearchController.java   
@GetMapping(value="/doctor", produces="application/json")
public DoctorInfo findAll(ModelMap model) {

    List<Doctor> doctors = docService.findAll();
    if(doctors == null) {
        return new DoctorInfo("No Doctors found!", null);
    }
    return new DoctorInfo("Doctors found", doctors);
}
项目:xm-ms-entity    文件:TenantDashboardClient.java   
@Override
@GetMapping({"tenants/{tenantKey}"})
Tenant getTenant(@PathVariable("tenantKey") String tenantKey);
项目:eventsourcing-examples    文件:CalenderController.java   
@GetMapping("/byResource/{resource}")
List<Booking> bookingsByResource(@PathVariable UUID resource) {
    return view.currentBookings()
        .filter(b -> b.getResourceId().equals(resource))
        .collect(toList());
}
项目:errorest-spring-boot-starter    文件:Controller.java   
@GetMapping(path = "/authentication-error-via-configuration", produces = {APPLICATION_JSON_VALUE, APPLICATION_XML_VALUE})
public void throwAuthenticationExceptionViaConfiguration() {
}