本站支持搜索的镜像仓库:Docker Hub、gcr.io、ghcr.io、quay.io、k8s.gcr.io、registry.gcr.io、elastic.co、mcr.microsoft.com

Document Store API是一个基于Dropwizard的应用程序,用于对MongoDB进行读写操作。该应用提供两种内容读取端点:/content-read/{uuid}用于按API设计契约返回格式化内容,确保响应格式符合规范;/content/{uuid}用于直接读取MongoDB中的原始文档,无格式限制。此外,应用还支持独立的列表(list)操作,其读写逻辑与内容操作分离。
%m%n以适配监控工具适用于需要高效文档存储与检索的后端服务,如内容管理系统、新闻资讯平台等场景,支持结构化文档和列表数据的管理需求。
# 跳过测试编译 mvn clean package -Djava.net.preferIPv4Stack=true -Dmaven.test.skip=true # 仅运行非集成测试 mvn clean package -Djava.net.preferIPv4Stack=true -Dshort # 运行所有测试(需本地MongoDB) docker-compose up mongodb -d MONGO_TEST_URL=localhost:27017 -Djava.net.preferIPv4Stack=true mvn clean package
java -jar target/document-store-api-0.0.1-SNAPSHOT.jar server config-local.yml
需传递Nexus服务器认证参数:
docker build -t coco/document-store-api --build-arg SONATYPE_USER=upp-nexus --build-arg SONATYPE_PASSWORD=AvailableInLastPass .
注意:自2016-10-18起,不再部署至UCS环境。
http://localhost:***/content/{uuid}Content-Type: application/json{ "uuid": "3b7b7702-debf-11e4-b9ec-00144feab7de", "title": "Ukraine looks to foreign-born ministers to kick-start reform", "titles": null, "byline": "Roman Olearchyk, Kiev, and Neil Buckley, London", "brands": [ { "id": "[***]" } ], "identifiers": [ { "authority": "[***]", "identifierValue": "3b7b7702-debf-11e4-b9ec-00144feab7de" } ], "publishedDate": "2015-04-15T08:33:02.000Z", "body": "<body><content data-embedded=\"true\" id=\"937885ac-e2bc-11e4-347b-978e959e1c97\" type=\"[***]\"></content><p>Late last year, US-born Natalie Jaresko was in the Kiev office of the investment firm she founded in 2006 when headhunters came to call. Within days she was named as finance minister of war-torn country.</p></body>", "description": null, "mediaType": null, "pixelWidth": null, "pixelHeight": null, "internalBinaryUrl": null, "members": null, "mainImage": "937885ac-e2bc-11e4-347b-978e959e1c97" }
http://localhost:***/content/{uuid}Content-Type: application/jsonGET http://localhost:***/content/{uuid},返回与PUT请求体格式一致的JSONPOST /{collection}?mget=true,请求体为UUID数组,返回找到的内容数组(未找到则返回空数组)
[ "fd204ed1-d53d-4b24-99a7-fc62a6778808", "4f97b689-d3e4-4ae2-ac34-9abc97a46c28", "c86ccb61-38d2-42bd-bb2f-9c69e1fca178" ]
GET http://localhost:***/content?uuid={uuid1}&uuid={uuid2}...,受URI长度限制(2083字符)GET http://localhost:***/content-query?identifierAuthority={authority}&identifierValue={identifierValue}GET /content-query?identifierAuthority=[***] HTTP/1.1http://localhost:***/lists/{uuid}Content-Type: application/json{ "uuid": "3c99c2ba-a6ae-11e2-95b1-00144feabdc0", "title": "Test List", "concept": { "uuid": "78d878ac-6226-47e4-84b1-39a127e3cc11", "prefLabel": "Markets" }, "listType": "TopStories", "items" : [ { "uuid": "0237b884-d124-11e2-be7b-00144feab7de" }, { "uuid": "68340f9f-67c3-33cd-97b1-f07bea7ce714" }, { "webUrl": "[***]" } ] }
concept和listType为可选字段;若提供concept,则uuid和prefLabel为必填;数据存储中不允许存在相同concept和listType的多个列表,重复时将触发Splunk告警。GET http://localhost:***/lists/{uuid}GET http://localhost:***/lists?curatedTopStoriesFor={concept-uuid}(支持多种列表类型,如curatedOpinionAndAnalysisFor),返回单条结果(多条匹配时返回一条并记录错误日志)http://localhost:***/lists/{uuid}Content-Type: application/json如需添加新资源类型,需在DocumentStoreApiApplication中为所需操作添加新的链处理器,处理器(Handler)和目标(Targets)可在多链中复用。
使用slf4j-json-logger库,日志格式固定为%m%n(详见***文档),以适配Splunk等监控工具的事件查询。


免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录方式配置轩辕镜像加速服务,包含7个详细步骤
在 Linux 系统上配置轩辕镜像源,支持主流发行版
在 Docker Desktop 中配置轩辕镜像加速,适用于桌面系统
在 Docker Compose 中使用轩辕镜像加速,支持容器编排
在 k8s 中配置 containerd 使用轩辕镜像加速
在宝塔面板中配置轩辕镜像加速,提升服务器管理效率
在 Synology 群晖NAS系统中配置轩辕镜像加速
在飞牛fnOS系统中配置轩辕镜像加速
在极空间NAS中配置轩辕镜像加速
在爱快ikuai系统中配置轩辕镜像加速
在绿联NAS系统中配置轩辕镜像加速
在威联通NAS系统中配置轩辕镜像加速
在 Podman 中配置轩辕镜像加速,支持多系统
配置轩辕镜像加速9大主流镜像仓库,包含详细配置步骤
无需登录即可使用轩辕镜像加速服务,更加便捷高效
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429