AppRegistryController.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:spring-cloud-dashboard 作者:
/**
 * Retrieve detailed information about a particular application.
 * @param type application type
 * @param name application name
 * @return detailed application information
 */
@RequestMapping(value = "/{type}/{name}", method = RequestMethod.GET)
@ResponseStatus(HttpStatus.OK)
public DetailedAppRegistrationResource info(
        @PathVariable("type") String type,
        @PathVariable("name") String name) {
    AppRegistration registration = appRegistry.find(name, type);
    if (registration == null) {
        throw new NoSuchAppRegistrationException(name, type);
    }
    DetailedAppRegistrationResource result = new DetailedAppRegistrationResource(assembler.toResource(registration));
    Resource resource = registration.getResource();

    List<ConfigurationMetadataProperty> properties = metadataResolver.listProperties(resource);
    for (ConfigurationMetadataProperty property : properties) {
        result.addOption(property);
    }
    return result;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号