{"id":44688037,"url":"https://github.com/bbossgroups/springboot-elasticsearch-webservice","last_synced_at":"2026-02-15T06:35:04.611Z","repository":{"id":41065123,"uuid":"171812253","full_name":"bbossgroups/springboot-elasticsearch-webservice","owner":"bbossgroups","description":"Spring boot Elasticsearch Demo 工程，适用于Elasticsearch 1.x,2.x,5.x,6.x,7.x +,兼容Spring boot 1.x,2.x ","archived":false,"fork":false,"pushed_at":"2025-10-22T08:50:58.000Z","size":307,"stargazers_count":35,"open_issues_count":3,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-22T10:28:45.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://esdoc.bbossgroups.com/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbossgroups.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-21T06:19:40.000Z","updated_at":"2025-10-22T08:51:02.000Z","dependencies_parsed_at":"2023-02-15T20:45:54.154Z","dependency_job_id":"f44ccb2f-3175-4474-8e31-9eac08a1c10a","html_url":"https://github.com/bbossgroups/springboot-elasticsearch-webservice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bbossgroups/springboot-elasticsearch-webservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbossgroups%2Fspringboot-elasticsearch-webservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbossgroups%2Fspringboot-elasticsearch-webservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbossgroups%2Fspringboot-elasticsearch-webservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbossgroups%2Fspringboot-elasticsearch-webservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbossgroups","download_url":"https://codeload.github.com/bbossgroups/springboot-elasticsearch-webservice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbossgroups%2Fspringboot-elasticsearch-webservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29471946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T05:26:30.465Z","status":"ssl_error","status_checked_at":"2026-02-15T05:26:21.858Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-15T06:35:02.804Z","updated_at":"2026-02-15T06:35:04.597Z","avatar_url":"https://github.com/bbossgroups.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo Introduce \n\nWeb service demo based on spring boot 1.x,2.x and Elasticsearch bboss client，include following elasticsearch operations:\n\n1. check indice exists\n2. Delete existing indice\n3. Create indice by dsl\n4. Get the indice definition structure\n5. Create/modify/delete/query index documents\n6. search documents pararrel\n7. database-elasticsearch数据同步\n8. hbase-elasticsearch数据同步\n9. file-elasticsearch数据同步\n\n# Demo build \n\nModify the es address in springboot-elasticsearch\\src\\main\\resources\\application.properties file:\n\n```java\nspring.elasticsearch.bboss.elasticsearch.rest.hostNames=192.168.137.1:9200\n```\n\nThen run the maven build packaging directive:\n\n```\nmvn clean package\n```\n\n\n\n# Demo run \n\nFirst run elasticsearch 5 or elasticsearch 6 or elasticsearch 7，run hbase and database for hbase-elasticsearch and database-elasticsearch. \n\nThen run the demo:\n\n```\nmvn clean install\ncd target\n\njava -jar es_bboss_web-0.0.1-SNAPSHOT.jar\n```\n\n\n\n# Run the service\n\nEnter the following address in the browser to perform the add, delete, modify and search operations:\n\nElasticsearch 7以下版本\n\nhttp://localhost:808/testBBossIndexCrud\n\nElasticsearch 7及以上版本\n\nhttp://localhost:808/testBBossIndexCrud7\n\n\nhttp://localhost:808/testBBossBulk\n\nhttp://localhost:808/shutdownBBossBulk\n\nhttp://localhost:808/testCommonBBossBulk\n\nhttp://localhost:808/shutdownCommonBBossBulk\n\nReturn the following search results in the browser to indicate successful execution:\n\n```json\n{\n    \"demos\": [\n        {\n            \"type\": \"demo\",\n            \"id\": \"3\",\n            \"fields\": null,\n            \"version\": 0,\n            \"index\": \"demo\",\n            \"highlight\": null,\n            \"sort\": null,\n            \"score\": 0,\n            \"parent\": null,\n            \"routing\": null,\n            \"found\": false,\n            \"nested\": null,\n            \"innerHits\": null,\n            \"dynamicPriceTemplate\": null,\n            \"demoId\": 3,\n            \"contentbody\": \"this is content body3\",\n            \"agentStarttime\": \"2019-02-21T05:08:19.724+0000\",\n            \"applicationName\": \"blackcatdemo3\",\n            \"orderId\": \"NFZF15045871807281445364228\",\n            \"contrastStatus\": 3,\n            \"name\": \"zhangxueyou\"\n        },\n        {\n            \"type\": \"demo\",\n            \"id\": \"2\",\n            \"fields\": null,\n            \"version\": 0,\n            \"index\": \"demo\",\n            \"highlight\": null,\n            \"sort\": null,\n            \"score\": 0,\n            \"parent\": null,\n            \"routing\": null,\n            \"found\": false,\n            \"nested\": null,\n            \"innerHits\": null,\n            \"dynamicPriceTemplate\": null,\n            \"demoId\": 2,\n            \"contentbody\": \"this is modify content body2\",\n            \"agentStarttime\": \"2019-02-21T05:08:19.871+0000\",\n            \"applicationName\": \"blackcatdemo2\",\n            \"orderId\": \"NFZF15045871807281445364228\",\n            \"contrastStatus\": 2,\n            \"name\": \"刘德华modify\\t\"\n        }\n    ],\n    \"totalSize\": 2\n}\n```\n# 本demo还包含三个数据同步的案例：\n- DB-Elasticsearch数据同步\n- Hbase-Elasticsearch数据同步（基于hbase 2.2.3开发，如果需要对接其他版本，需要调整pom.xml中的hbase-shaded-client maven坐标版本号）\n```xml\n\t    \u003cdependency\u003e\n\t\t\t\u003cgroupId\u003eorg.apache.hbase\u003c/groupId\u003e\n\t\t\t\u003cartifactId\u003ehbase-shaded-client\u003c/artifactId\u003e\n\t\t\t\u003cversion\u003e2.2.3\u003c/version\u003e\n\t\t\u003c/dependency\u003e\n```\n- File-Elasticsearch数据采集\n\n使用方法如下：\n\n# 1.运行基本db-elasticsearch作业\n## 1.1 run the db-elasticsearch data tran job\nEnter the following address in the browser to run the db-elasticsearch data tran job:\n\nhttp://localhost:808/scheduleDB2ESJob\n\nReturn the following results in the browser to show successful execution:\n\n作业启动成功\n```json\ndb2ESImport job started.\n```\n\n作业已经启动\n```json\ndb2ESImport job has started.\n```\n## 1.2 stop the db-elasticsearch data tran job\nEnter the following address in the browser to stop the db-elasticsearch data tran job:\n\nhttp://localhost:808/stopDB2ESJob\n\nReturn the following search results in the browser to show successful execution:\n作业停止成功\n```json\ndb2ESImport job started.\n```\n作业已经停止\n```json\ndb2ESImport job has been stopped.\n```\n# 2.运行基本hbase-elasticsearch作业\n## 2.1 run the hbase-elasticsearch data tran job\nEnter the following address in the browser to run the hbase-elasticsearch data tran job:\n\nhttp://localhost:808/scheduleHBase2ESJob\n\nReturn the following results in the browser to show successful execution:\n\n作业启动成功\n```json\nHBase2ES job started.\n```\n\n作业已经启动\n```json\nHBase2ES job has started.\n```\n## 2.2 stop the db-elasticsearch data tran job\nEnter the following address in the browser to stop the hbase-elasticsearch data tran job:\n\nhttp://localhost:808/stopHBase2ESJob\n\nReturn the following search results in the browser to show successful execution:\n作业停止成功\n```json\nHBase2ES job started.\n```\n作业已经停止\n```json\nHBase2ES job has been stopped.\n```\n\n# 3.运行控制作业调度的db-elasticsearch作业\n## 3.1 run the db-elasticsearch data tran job\nEnter the following address in the browser to run the db-elasticsearch data tran job:\n创建需要人工手动暂停才能暂停作业，作业启动后持续运行，当暂停后需执行resume作业才能继续调度执行\nhttp://localhost:808/schedulecontrol/scheduleDB2ESJob?autoPause=false\n\n创建具备暂停功能的数据同步作业，调度执行后将作业自动标记为暂停状态，等待下一个resumeShedule指令才继续允许作业调度执行，执行后再次自动暂停\nhttp://localhost:808/schedulecontrol/scheduleDB2ESJob?autoPause=true\n\nReturn the following results in the browser to show successful execution:\n\n作业启动成功\n```json\ndb2ESImport job started.\n```\n\n作业已经启动\n```json\ndb2ESImport job has started.\n```\n## 3.2 stop the db-elasticsearch data tran job\nEnter the following address in the browser to stop the db-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/stopDB2ESJob\n\nReturn the following search results in the browser to show successful execution:\n作业停止成功\n```json\ndb2ESImport job stopped.\n```\n作业已经停止\n```json\ndb2ESImport job has been stopped.\n```\n## 3.3 Pause schedule the db-elasticsearch data tran job\nEnter the following address in the browser to Pause the db-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/pauseScheduleDB2ESJob\n\nReturn the following search results in the browser to show successful execution:\n作业暂停成功\n```json\ndb2ESImport job schedule paused.\n```\n作业已经暂停\n```json\nb2ESImport job schedule is not scheduled, Ignore pauseScheduleJob command.\n```\n作业已经停止\n```json\ndb2ESImport job has been stopped.\n```\n\n## 3.4 Resume schedule the db-elasticsearch data tran job\nEnter the following address in the browser to Resume the db-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/resumeScheduleDB2ESJob\n\nReturn the following search results in the browser to show successful execution:\n作业继续调度成功\n```json\ndb2ESImport job schedule resume to continue.\n```\n作业已经在调度执行提示\n```json\ndb2ESImport job schedule is not paused, Ignore resumeScheduleJob command.\n```\n作业已经停止\n```json\ndb2ESImport job has been stopped.\n```\n\n# 4.运行控制作业调度的基本hbase-elasticsearch作业\n## 4.1 run the hbase-elasticsearch data tran job\nEnter the following address in the browser to run the hbase-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/scheduleHBase2ESJob\n\nReturn the following results in the browser to show successful execution:\n\n作业启动成功\n```json\nHBase2ES job started.\n```\n\n作业已经启动\n```json\nHBase2ES job has started.\n```\n## 4.2 stop the hbase-elasticsearch data tran job\nEnter the following address in the browser to stop the hbase-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/stopHBase2ESJob\n\nReturn the following search results in the browser to show successful execution:\n作业停止成功\n```json\nHBase2ES job started.\n```\n作业已经停止\n```json\nHBase2ES job has been stopped.\n```\n## 4.3 Pause schedule the hbase-elasticsearch data tran job\nEnter the following address in the browser to Pause the hbase-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/pauseScheduleHBase2ESJob\n\nReturn the following search results in the browser to show successful execution:\n作业暂停成功\n```json\nHBase2ES job schedule paused.\n```\n作业已经暂停\n```json\nHBase2ES job schedule is not scheduled, Ignore pauseScheduleJob command.\n```\n作业已经停止\n```json\nHBase2ES job has been stopped.\n```\n\n## 4.4 Resume schedule the hbase-elasticsearch data tran job\nEnter the following address in the browser to Resume the hbase-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/resumeScheduleHBase2ESJob\n\nReturn the following search results in the browser to show successful execution:\n作业继续调度成功\n```json\nHBase2ES job schedule resume to continue.\n```\n作业已经在调度执行\n```json\nHBase2ES job schedule is not paused, Ignore resumeScheduleJob command.\n```\n作业已经停止\n```json\nHBase2ES job has been stopped.\n```\n\n# 5.运行控制作业调度的基本file-elasticsearch作业\n## 5.1 run the file-elasticsearch data tran job\nEnter the following address in the browser to run the file-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/startfile2es\n\n或者创建带有自动暂停的作业\n\nReturn the following results in the browser to show successful execution:\n\n作业启动成功\n```json\nfile2ES job started.\n```\n\n作业已经启动\n```json\nfile2ES job has started.\n```\n## 5.2 stop the file-elasticsearch data tran job\nEnter the following address in the browser to stop the file-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/stopfile2es\n\nReturn the following search results in the browser to show successful execution:\n作业停止成功\n```json\nfile2ES job started.\n```\n作业已经停止\n```json\nfile2ES job has been stopped.\n```\n## 5.3 Pause schedule the file-elasticsearch data tran job\nEnter the following address in the browser to Pause the file-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/pauseFile2es\n\nReturn the following search results in the browser to show successful execution:\n作业暂停成功\n```json\nfile2ES job schedule paused.\n```\n作业已经暂停\n```json\nfile2ES job schedule is not scheduled, Ignore pauseScheduleJob command.\n```\n作业已经停止\n```json\nfile2ES job has been stopped.\n```\n\n## 5.4 Resume schedule the file-elasticsearch data tran job\nEnter the following address in the browser to Resume the file-elasticsearch data tran job:\n\nhttp://localhost:808/schedulecontrol/resumeFile2es\n\nReturn the following search results in the browser to show successful execution:\n作业继续调度成功\n```json\nfile2ES job schedule resume to continue.\n```\n作业已经在调度执行\n```json\nfile2ES job schedule is not paused, Ignore resumeScheduleJob command.\n```\n作业已经停止\n```json\nfile2ES job has been stopped.\n```\n\n## 5.5 schedule the DB2Kafka data tran job\nEnter the following address in the browser to schedule the DB2Kafka data tran job:\n\nhttp://localhost:808/scheduleDB2KafkaJob\n\nReturn the following search results in the browser to show successful execution:\n作业调度成功\n```json\ndb2kafkaImportBuilder job started.\n```\n作业已经在调度执行\n```json\ndb2kafkaImportBuilder job has started.\n```\n\n## 5.6 stop the DB2Kafka data tran job\nEnter the following address in the browser to stop the DB2Kafka  data tran job:\n\nhttp://localhost:808/stopDB2kafkaJob\n\nReturn the following search results in the browser to show successful execution:\n作业stop成功\n```json\ndb2kafkaImportBuilder job stopped.\n```\n作业已经stop\n```json\ndb2kafkaImportBuilder job has stopped.\n```\n\n\n## 5.7 schedule the Kafka2es data tran job\nEnter the following address in the browser to schedule the Kafka2es data tran job:\n\nhttp://localhost:808/scheduleKafka2esJob\n\nReturn the following search results in the browser to show successful execution:\n作业调度成功\n```json\nkafka2esImportBuilder job started.\n```\n作业已经在调度执行\n```json\nkafka2esImportBuilder job has started.\n```\n\n## 5.8 stop the Kafka2es data tran job\nEnter the following address in the browser to stop the Kafka2es  data tran job:\n\nhttp://localhost:808/stopKafka2esJob\n\nReturn the following search results in the browser to show successful execution:\n作业stop成功\n```json\ndb2kafkaImportBuilder job stopped.\n```\n作业已经stop\n```json\ndb2kafkaImportBuilder job has stopped.\n```\n\n\n## 5.9 schedule the Db2Eleasticsearch data tran and Metrics job\nEnter the following address in the browser to schedule the Db2Eleasticsearch data tran and Metrics :\n\nhttp://localhost:808/scheduleDb2EleasticsearchMetrics\n\nReturn the following search results in the browser to show successful execution:\n作业调度成功\n```json\nDb2Eleasticsearch data tran and Metrics job started.\n```\n作业已经在调度执行\n```json\nDb2Eleasticsearch data tran and Metrics job has started.\n```\n\n## 5.10 stop the Db2Eleasticsearch data tran and Metrics job\nEnter the following address in the browser to stop the Db2Eleasticsearch data tran and Metrics job:\n\nhttp://localhost:808/stopDb2EleasticsearchMetrics\n\nReturn the following search results in the browser to show successful execution:\n作业stop成功\n```json\nDb2Eleasticsearch data tran and Metrics job stopped.\n```\n作业已经stop\n```json\nDb2Eleasticsearch data tran and Metrics job has stopped.\n```\n\n\n\n# Development document：\n\nhttps://esdoc.bbossgroups.com/#/development","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbossgroups%2Fspringboot-elasticsearch-webservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbossgroups%2Fspringboot-elasticsearch-webservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbossgroups%2Fspringboot-elasticsearch-webservice/lists"}