当前位置: 首页 > news >正文

大企业网站建设wordpress更换主题的技巧

大企业网站建设,wordpress更换主题的技巧,网站开发专业优势,沈阳专业网站制作公司couchbaseCouchbase是一个开源的NoSQL文档数据库。 它允许访问#xff0c;索引和查询JSON文档#xff0c;同时利用集成的分布式缓存来实现高性能数据访问。 开发人员可以使用不同的语言#xff08;Java#xff0c;Go#xff0c;.NET#xff0c;Node#xff0c;PHP… couchbase Couchbase是一个开源的NoSQL文档数据库。 它允许访问索引和查询JSON文档同时利用集成的分布式缓存来实现高性能数据访问。 开发人员可以使用不同的语言JavaGo.NETNodePHPPythonC 多种SDK将应用程序编写到Couchbase。 该博客将展示如何使用Java SDK for Couchbase轻松创建CRUD应用程序。 带有Couchbase的REST 该应用程序将使用curl向部署在WildFly上的JAX-RS端点发出REST命令。 然后这些命令将对Couchbase中的travel-sample存储桶执行CRUD操作。 N1QLJSONSQL查询语言将用于与Couchbase通信以检索结果。 “生成器模式”和原始N1QL命令都将使用。 TL; DR 样本的完整源代码和说明可在github.com/arun-gupta/couchbase-javaee中找到 。 让我们开始吧 运行Couchbase服务器 可以从“ Couchbase服务器下载”页面轻松下载Couchbase服务器 。 在容器化的世界中 使用Docker启动Couchbase服务器要容易得多 。 如果在您的计算机上配置了Docker那么最简单的方法是将Docker Compose用于Couchbase mycouchbase:name: mycouchbaseimage: couchbase/servervolumes:- ~/couchbase:/opt/couchbase/varports:- 8091:8091- 8092:8092 - 8093:8093 - 11210:11210 启动应用程序服务器显示 docker-compose up -d Creating couchbaseserver_mycouchbase_1 然后日志可以看成是 docker-compose logs Attaching to couchbaseserver_mycouchbase_1 mycouchbase_1 | Starting Couchbase Server -- Web UI available at http://ip:8091 该数据库需要配置并在“ 配置Couchbase服务器”中进行了说明 。 确保安装travel-sample桶。 在WildFly上部署Java EE应用程序 下载WildFly 9.0.2 解压缩然后以./wildfly-9.0.0.Final/bin/standalone.sh启动WildFly应用程序服务器。 Git克隆仓库 git clone https://github.com/arun-gupta/couchbase-javaee.git 更改目录cd couchbase-javaee 将应用程序部署到WildFly mvn install -Pwildfly 。 该应用程序通过导入以下Maven坐标将Java SDK用于Couchbase dependencygroupIdcom.couchbase.client/groupIdartifactIdjava-client/artifactIdversion2.2.1/version /dependency使用cURL调用REST端点 GET航空公司资源最多10个 让我们查询数据库以列出10个航空公司资源。 请求 ~ curl -v http://localhost:8080/couchbase-javaee/resources/airline * Hostname was NOT found in DNS cache * Trying ::1... * connect to ::1 port 8080 failed: Connection refused * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0)GET /couchbase-javaee/resources/airline HTTP/1.1User-Agent: curl/7.37.1Host: localhost:8080Accept: */* 响应 HTTP/1.1 200 OKConnection: keep-aliveX-Powered-By: Undertow/1 * Server WildFly/9 is not blacklistedServer: WildFly/9Content-Type: application/octet-streamContent-Length: 1415Date: Wed, 18 Nov 2015 21:19:15 GMT* Connection #0 to host localhost left intact [{travel-sample:{country:France,iata:SB,callsign:AIRCALIN,name:Air Caledonie International,icao:ACI,id:139,type:airline}}, {travel-sample:{country:United States,iata:WQ,callsign:null,name:PanAm World Airways,icao:PQW,id:13633,type:airline}}, {travel-sample:{country:United Kingdom,iata:BA,callsign:SPEEDBIRD,name:British Airways,icao:BAW,id:1355,type:airline}}, {travel-sample:{country:United States,iata:FL,callsign:CITRUS,name:AirTran Airways,icao:TRS,id:1316,type:airline}}, {travel-sample:{country:United States,iata:-,callsign:null,name:U.S. Air,icao:--,id:13391,type:airline}}, {travel-sample:{country:United States,iata:Q5,callsign:MILE-AIR,name:40-Mile Air,icao:MLA,id:10,type:airline}}, {travel-sample:{country:France,iata:AF,callsign:AIRFRANS,name:Air France,icao:AFR,id:137,type:airline}}, {travel-sample:{country:United States,iata:K5,callsign:SASQUATCH,name:SeaPort Airlines,icao:SQH,id:10765,type:airline}}, {travel-sample:{country:France,iata:A5,callsign:AIRLINAIR,name:Airlinair,icao:RLA,id:1203,type:airline}}, {travel-sample:{country:United Kingdom,iata:5W,callsign:FLYSTAR,name:Astraeus,icao:AEU,id:112,type:airline}}] N1QL查询对此写为 N1qlQuery query N1qlQuery.simple(select(*).from(i(database.getBucket().name())).limit(10)); 并且也可以写成 SELECT * FROM travel-sample LIMIT 10 您可以选择更新代码以包含ORDER BY子句如N1QL教程中所示。 获得一份航空公司资源 使用id属性查询单个航空公司资源 请求 ~ curl -v http://localhost:8080/couchbase-javaee/resources/airline/139 * Hostname was NOT found in DNS cache * Trying ::1... * connect to ::1 port 8080 failed: Connection refused * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0)GET /couchbase-javaee/resources/airline/139 HTTP/1.1User-Agent: curl/7.37.1Host: localhost:8080Accept: */* 响应 HTTP/1.1 200 OKConnection: keep-aliveX-Powered-By: Undertow/1 * Server WildFly/9 is not blacklistedServer: WildFly/9Content-Type: application/octet-streamContent-Length: 148Date: Wed, 18 Nov 2015 21:23:34 GMT* Connection #0 to host localhost left intact {travel-sample:{country:France,iata:SB,callsign:AIRCALIN,name:Air Caledonie International,icao:ACI,id:139,type:airline}} 发布新的航空公司资源 了解如何使用CBQ工具从CLI运行N1QL查询并验证现有样本数据 bin ./cbq -enginehttp://192.168.99.100:8093 Couchbase query shell connected to http://192.168.99.100:8093/ . Type Ctrl-D to exit. cbq select * from travel-sample where nameAirlinair limit 10; {requestID: ce2de67b-2c05-47df-afbe-343cb7409d2b,signature: {*: *},results: [{travel-sample: {callsign: AIRLINAIR,country: France,iata: A5,icao: RLA,id: 1203,name: Airlinair,type: airline}}],status: success,metrics: {elapsedTime: 3.418285894s,executionTime: 3.418232688s,resultCount: 1,resultSize: 294} } 该查询检索航空公司名称为Airlinair文档。 该计数显示在metrics.resultCount 。 使用POST创建一个新文档。 请求 ~ curl -v -H Content-Type: application/json -X POST -d {country:France,iata:A5,callsign:AIRLINAIR,name:Airlinair,icao:RLA,type:airline} http://localhost:8080/couchbase-javaee/resources/airline * Hostname was NOT found in DNS cache * Trying ::1... * connect to ::1 port 8080 failed: Connection refused * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0)POST /couchbase-javaee/resources/airline HTTP/1.1User-Agent: curl/7.37.1Host: localhost:8080Accept: */*Content-Type: application/jsonContent-Length: 104 响应 * upload completely sent off: 104 out of 104 bytesHTTP/1.1 200 OKConnection: keep-aliveX-Powered-By: Undertow/1 * Server WildFly/9 is not blacklistedServer: WildFly/9Content-Type: application/octet-streamContent-Length: 117Date: Wed, 18 Nov 2015 21:42:51 GMT* Connection #0 to host localhost left intact {country:France,iata:A5,callsign:AIRLINAIR,name:Airlinair,icao:RLA,id:19810,type:airline} 使用CBQ再次查询现在结果显示为 cbq select * from travel-sample where nameAirlinair limit 10; {requestID: 5e79031a-f7ee-4cc9-8c87-4e3b7484f09f,signature: {*: *},results: [{travel-sample: {callsign: AIRLINAIR,country: France,iata: A5,icao: RLA,id: 1203,name: Airlinair,type: airline}},{travel-sample: {callsign: AIRLINAIR,country: France,iata: A5,icao: RLA,id: 19810,name: Airlinair,type: airline}}],status: success,metrics: {elapsedTime: 3.342391947s,executionTime: 3.342343455s,resultCount: 2,resultSize: 591} } 请注意返回的是两个JSON文档而不是发出POST命令之前的一个。 放置现有的航空公司资源 使用HTTP POST更新现有资源。 travel-sample存储区的数据模型需要在有效负载和URI中都包含“ id”属性。 请求 ~ curl -v -H Content-Type: application/json -X PUT -d {country:France,iata:A5,callsign:AIRLINAIR,name:Airlin Air,icao:RLA,type:airline,id: 19810} http://localhost:8080/couchbase-javaee/resources/airline/19810 * Hostname was NOT found in DNS cache * Trying ::1... * connect to ::1 port 8080 failed: Connection refused * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0)PUT /couchbase-javaee/resources/airline/19810 HTTP/1.1User-Agent: curl/7.37.1Host: localhost:8080Accept: */*Content-Type: application/jsonContent-Length: 118* upload completely sent off: 118 out of 118 bytes 航空公司名称从“ Airlinair”更新为“ Airlin Air”所有其他属性保持不变。 响应 HTTP/1.1 200 OKConnection: keep-aliveX-Powered-By: Undertow/1 * Server WildFly/9 is not blacklistedServer: WildFly/9Content-Type: application/octet-streamContent-Length: 117Date: Wed, 18 Nov 2015 21:46:16 GMT* Connection #0 to host localhost left intact {country:France,iata:A5,callsign:AIRLINAIR,name:Airlin Air,icao:RLA,id:19810,type:airline} 更新的记录显示在响应中。 查询Airlinair会给出 cbq select * from travel-sample where nameAirlinair limit 10; {requestID: a8d72427-9f4b-49ab-a77a-17cd99cdce5f,signature: {*: *},results: [{travel-sample: {callsign: AIRLINAIR,country: France,iata: A5,icao: RLA,id: 1203,name: Airlinair,type: airline}}],status: success,metrics: {elapsedTime: 3.372603693s,executionTime: 3.37256091s,resultCount: 1,resultSize: 294} } 因此以前添加的记录现在已更新因此不会出现在查询结果中。 查询Airlin Air可得到 cbq select * from travel-sample where nameAirlin Air limit 10; {requestID: a3797a73-d879-4ca1-be90-e07179aae118,signature: {*: *},results: [{travel-sample: {callsign: AIRLINAIR,country: France,iata: A5,icao: RLA,id: 19810,name: Airlin Air,type: airline}}],status: success,metrics: {elapsedTime: 3.393649025s,executionTime: 3.393530368s,resultCount: 1,resultSize: 298} } 这显示了新更新的文档。 删除现有的航空公司资源 查询唯一的ID cbq select * from travel-sample where id19810 limit 10; {requestID: 47a315cd-afe4-45a8-8814-5ab3034e0d0f,signature: {*: *},results: [{travel-sample: {callsign: AIRLINAIR,country: France,iata: A5,icao: RLA,id: 19810,name: Airlin Air,type: airline}}],status: success,metrics: {elapsedTime: 3.006863656s,executionTime: 3.006821997s,resultCount: 1,resultSize: 298} } 请注意返回了一个文档。 让我们删除此文档。 请求 ~ curl -v -X DELETE http://localhost:8080/couchbase-javaee/resources/airline/19810 * Hostname was NOT found in DNS cache * Trying ::1... * connect to ::1 port 8080 failed: Connection refused * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0)DELETE /couchbase-javaee/resources/airline/19810 HTTP/1.1User-Agent: curl/7.37.1Host: localhost:8080Accept: */* 响应 HTTP/1.1 200 OKConnection: keep-aliveX-Powered-By: Undertow/1 * Server WildFly/9 is not blacklistedServer: WildFly/9Content-Type: application/octet-streamContent-Length: 136Date: Wed, 18 Nov 2015 21:52:47 GMT* Connection #0 to host localhost left intact {travel-sample:{country:France,iata:A5,callsign:AIRLINAIR,name:Airlin Air,icao:RLA,id:19810,type:airline}} 删除的文档显示在响应中。 再次查询已删除的ID cbq select * from travel-sample where id19810 limit 10; {requestID: 972b0bbd-ba25-4f6c-a30e-ed188bf43588,signature: {*: *},results: [],status: success,metrics: {elapsedTime: 3.261481199s,executionTime: 3.261431917s,resultCount: 0,resultSize: 0} } 而且没有结果返回 如前所述完整的代码库位于github.com/arun-gupta/couchbase-javaee 。 请享用 翻译自: https://www.javacodegeeks.com/2015/11/crud-java-application-couchbase-java-ee-wildfly.htmlcouchbase
http://www.zqtcl.cn/news/706503/

相关文章:

  • 江苏水利建设网站排行榜百度
  • 营销导向的企业网站优化wordpress制作企业
  • 株洲网站建设公司wordpress资讯类主题破解版
  • 网站导航栏设计要求wordpress直达按钮
  • 网站建设寻找可以途径网站制作的目的
  • 私募基金网站建设wordpress快讯插件
  • 无锡网站搜索引擎优化校园二级网站建设
  • 用vps刷网站流量要怎么做云主机开网站教程
  • 个体户经营异常如何网上解除深圳seo云哥
  • 网站建设科研申报书沧州网站建设定制价格
  • 家纺营销型网站wordpress演示数据
  • 中卫建设厅网站中国纪检监察报
  • 网站建设费如何核算如何给网站做权重
  • 东莞营销型高端网站建设网页专题设计
  • 神兵网站建设互联网个人用户网站
  • 类似视频教程网站的wordpress主题网页设计用什么尺寸的画布好
  • 仿模板电影网站线上销售的方法和技巧
  • 漳州建设银行网站首页速成建站
  • 网站建立的链接不安全怎么解决学校网站怎样建设
  • 信阳市工程建设信息网站wordpress段子
  • 网站建设和网络搭建是一回事吗长沙网站搭建优化
  • 基础网站怎么做石景山公司
  • 吉他谱网站如何建设wordpress主题字体用隶书
  • 做一个宣传网站的策划书自己怎样推广呢
  • 网站建设布局利于优化火狐搜索引擎
  • 公司给别人做的网站违法吗hexo插件wordpress
  • 网站用什么语言做动易网站迁移
  • 网站备案上传照片几寸织梦模板网站好吗
  • 怎么通过数据库做网站的登录wordpress 注册登录插件
  • 读书网站排名大的网站建设公司好