- 浏览: 668255 次
- 性别:
- 来自: 长沙
文章分类
- 全部博客 (364)
- quick start (57)
- bboss aop (43)
- bboss mvc (48)
- bboss persistent (96)
- bboss taglib (30)
- bboss event (10)
- bbossgroups (52)
- bboss (32)
- bboss会话共享 (17)
- bboss rpc (7)
- bboss 国际化 (5)
- bboss 序列化 (9)
- bboss cxf webservice (8)
- bboss hessian (3)
- bboss 安全认证SSO (15)
- bboss 工作流 (6)
- 平台 (18)
- bboss quartz (3)
- 杂谈 (5)
- 大数据 (1)
- bboss elastic (24)
- bboss http (1)
- bboss kafka (1)
- Elasticsearch Scroll和Slice Scroll查询API使用案例 (1)
最新评论
-
qianhao123:
...
采用gradle构建和发布bboss方法介绍 -
qianhao123:
[img][/img]
采用gradle构建和发布bboss方法介绍 -
yin_bp:
欢迎大家参与working
高性能elasticsearch ORM开发库使用介绍 -
qq641879434:
万分感谢
bboss 持久层sql xml配置文件编写和加载方法介绍 -
yin_bp:
qq641879434 写道怎么设置配置文件 可以查看执行的S ...
bboss 持久层sql xml配置文件编写和加载方法介绍
Spring Boot整合ElasticSearch单个集群和多个集群案例分享,本文涉及内容:
本文内容适合于:
1.导入spring boot elasticsearch starter
在spring boot项目中导入spring boot elasticsearch starter
maven工程
gradle工程
2.创建spring boot启动类
新建Application类:
Application类中定义了一个main方法用来启动spring boot elasticsearch测试应用。
Application类将被用于启动下面两个测试用例:
定义elasticsearch rest client组件实列管理类ServiceApiUtil:
实列管理类ServiceApiUtil将被注入到后续的测试用例中。
3.单es集群配置和使用
3.1 配置单es集群
修改spring boot配置文件application.properties内容(yml格式配置文件参考下面的内容配置):
单ES集群配置项都是以spring.elasticsearch.bboss开头。
3.2 单集群测试用例
编写es单集群测试用例BBossESStarterTestCase
直接通过junit运行上述测试用例即可
4.多ES集群测试用例
4.1 配置多es集群
修改spring boot配置文件application-multi-datasource.properties,内容如下:
配置说明:
上面配置了两个集群:default和logs
每个集群配置项的前缀为:spring.elasticsearch.bboss.集群名字,其中的集群名字是一个自定义的逻辑名称,用来在client api中引用集群。
default集群的配置项前缀为:
spring.elasticsearch.bboss.default
logs集群的配置项前缀为:
spring.elasticsearch.bboss.logs
同时每个集群的配置项目里面必须包含name项目的配置
default集群name配置:
spring.elasticsearch.bboss.default.name = default
logs集群name配置:
##logs集群配置
spring.elasticsearch.bboss.logs.name = logs
4.2 定义加载多es集群配置的spring boot Configuration类
新建类MultiESSTartConfigurer
说明:
MultiESSTartConfigurer通过以下两个方法分别加载default和logs两个es集群的配置
default集群配置加载
4.3 定义多es集群测试用例
多es集群测试用例MultiBBossESStartersTestCase
直接通过junit运行上述测试用例即可。
5.完整的demo工程
https://gitee.com/bbossgroups/eshelloword-spring-boot-starter
https://github.com/bbossgroups/eshelloword-spring-boot-starter
6 开发交流
elasticsearch技术交流群:166471282
elasticsearch微信公众号:
The best elasticsearch highlevel java rest api-----bboss
- 导入spring boot elasticsearch starter
- 单个es集群案例
- 多个es集群案例
本文内容适合于:
- spring boot 1.x,2.x
- elasticsearch 1.x,2.x,5.x,6.x,+
1.导入spring boot elasticsearch starter
在spring boot项目中导入spring boot elasticsearch starter
maven工程
<dependency> <groupId>com.bbossgroups.plugins</groupId> <artifactId>bboss-elasticsearch-spring-boot-starter</artifactId> <version>5.2.5</version> </dependency>
gradle工程
compile "com.bbossgroups.plugins:bboss-elasticsearch-spring-boot-starter:5.2.5"
2.创建spring boot启动类
新建Application类:
package org.bboss.elasticsearchtest.springboot; import org.frameworkset.elasticsearch.ElasticSearchHelper; import org.frameworkset.elasticsearch.client.ClientInterface; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; /** * @author yinbp [122054810@qq.com] * */ @SpringBootApplication public class Application { private Logger logger = LoggerFactory.getLogger(Application.class); public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
Application类中定义了一个main方法用来启动spring boot elasticsearch测试应用。
Application类将被用于启动下面两个测试用例:
- 单es集群测试用例
- 多es集群测试用例
定义elasticsearch rest client组件实列管理类ServiceApiUtil:
package org.bboss.elasticsearchtest.springboot; /* * Copyright 2008 biaoping.yin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.frameworkset.elasticsearch.ElasticSearchHelper; import org.frameworkset.elasticsearch.client.ClientInterface; import org.springframework.stereotype.Service; /** * 管理es rest client组件实例 */ @Service public class ServiceApiUtil { /** * 获取操作默认的es集群的客户端工具组件 * @return */ public ClientInterface restClient(){ return ElasticSearchHelper.getRestClientUtil(); } /** * 获取操作默认的es集群的加载dsl配置文件的客户端工具组件 * @return */ public ClientInterface restDemoConfigClient(){ return ElasticSearchHelper.getConfigRestClientUtil("esmapper/demo.xml"); } /** * 获取操作logs的es集群的客户端工具组件 * @return */ public ClientInterface restClientLogs(){ return ElasticSearchHelper.getRestClientUtil("logs"); } /** * 获取操作logs的es集群的加载dsl配置文件的客户端工具组件 * @return */ public ClientInterface restConfigClientLogs(){ return ElasticSearchHelper.getConfigRestClientUtil("logs","esmapper/demo.xml"); } }
实列管理类ServiceApiUtil将被注入到后续的测试用例中。
3.单es集群配置和使用
3.1 配置单es集群
修改spring boot配置文件application.properties内容(yml格式配置文件参考下面的内容配置):
##ES集群配置 spring.elasticsearch.bboss.elasticUser=elastic spring.elasticsearch.bboss.elasticPassword=changeme #elasticsearch.rest.hostNames=10.1.236.88:9200 #elasticsearch.rest.hostNames=127.0.0.1:9200 #elasticsearch.rest.hostNames=10.21.20.168:9200 spring.elasticsearch.bboss.elasticsearch.rest.hostNames=10.21.20.168:9200 #elasticsearch.rest.hostNames=10.180.211.27:9280,10.180.211.27:9281,10.180.211.27:9282 spring.elasticsearch.bboss.elasticsearch.dateFormat=yyyy.MM.dd spring.elasticsearch.bboss.elasticsearch.timeZone=Asia/Shanghai spring.elasticsearch.bboss.elasticsearch.ttl=2d #在控制台输出脚本调试开关showTemplate,false关闭,true打开,同时log4j至少是info级别 spring.elasticsearch.bboss.elasticsearch.showTemplate=true spring.elasticsearch.bboss.elasticsearch.discoverHost=false # dsl配置文件热加载扫描时间间隔,毫秒为单位,默认5秒扫描一次,<= 0时关闭扫描机制 spring.elasticsearch.bboss.dslfile.refreshInterval = -1 ##es client http连接池配置 spring.elasticsearch.bboss.http.timeoutConnection = 400000 spring.elasticsearch.bboss.http.timeoutSocket = 400000 spring.elasticsearch.bboss.http.connectionRequestTimeout=400000 spring.elasticsearch.bboss.http.retryTime = 1 spring.elasticsearch.bboss.http.maxLineLength = -1 spring.elasticsearch.bboss.http.maxHeaderCount = 200 spring.elasticsearch.bboss.http.maxTotal = 400 spring.elasticsearch.bboss.http.defaultMaxPerRoute = 200 spring.elasticsearch.bboss.http.soReuseAddress = false spring.elasticsearch.bboss.http.soKeepAlive = false spring.elasticsearch.bboss.http.timeToLive = 3600000 spring.elasticsearch.bboss.http.keepAlive = 3600000 spring.elasticsearch.bboss.http.keystore = spring.elasticsearch.bboss.http.keyPassword = # ssl 主机名称校验,是否采用default配置, # 如果指定为default,就采用DefaultHostnameVerifier,否则采用 SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER spring.elasticsearch.bboss.http.hostnameVerifier = ## 数据库数据源配置,使用db-es数据导入功能时需要配置 #spring.elasticsearch.bboss.db.name = test #spring.elasticsearch.bboss.db.user = root #spring.elasticsearch.bboss.db.password = 123456 #spring.elasticsearch.bboss.db.driver = com.mysql.jdbc.Driver #spring.elasticsearch.bboss.db.url = jdbc:mysql://localhost:3306/bboss #spring.elasticsearch.bboss.db.usePool = false #spring.elasticsearch.bboss.db.validateSQL = select 1
单ES集群配置项都是以spring.elasticsearch.bboss开头。
3.2 单集群测试用例
编写es单集群测试用例BBossESStarterTestCase
/* * Copyright 1999-2018 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.bboss.elasticsearchtest.springboot; import org.frameworkset.elasticsearch.client.ClientInterface; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; /** * 单集群演示功能测试用例,spring boot配置项以spring.elasticsearch.bboss开头 * 对应的配置文件为application.properties文件 * @author yinbp [122054810@qq.com] */ @RunWith(SpringRunner.class) @SpringBootTest(classes = Application.class) public class BBossESStarterTestCase { @Test public void testBbossESStarter() throws Exception { // System.out.println(bbossESStarter); //验证环境,获取es状态 String response = serviceApiUtil.restClient().executeHttp("_cluster/state?pretty",ClientInterface.HTTP_GET); System.out.println(response); //判断索引类型是否存在,false表示不存在,正常返回true表示存在 boolean exist = serviceApiUtil.restClient().existIndiceType("twitter","tweet"); //判读索引是否存在,false表示不存在,正常返回true表示存在 exist = serviceApiUtil.restClient().existIndice("twitter"); exist = serviceApiUtil.restClient().existIndice("agentinfo"); } }
直接通过junit运行上述测试用例即可
4.多ES集群测试用例
4.1 配置多es集群
修改spring boot配置文件application-multi-datasource.properties,内容如下:
##多集群配置样例,如果需要做多集群配置,请将参照本文内容修改application.properties文件内容 spring.elasticsearch.bboss.default.name = default ##default集群配配置 spring.elasticsearch.bboss.default.elasticUser=elastic spring.elasticsearch.bboss.default.elasticPassword=changeme #elasticsearch.rest.hostNames=10.1.236.88:9200 #elasticsearch.rest.hostNames=127.0.0.1:9200 spring.elasticsearch.bboss.default.elasticsearch.rest.hostNames=10.21.20.168:9200 #elasticsearch.rest.hostNames=10.180.211.27:9280,10.180.211.27:9281,10.180.211.27:9282 spring.elasticsearch.bboss.default.elasticsearch.dateFormat=yyyy.MM.dd spring.elasticsearch.bboss.default.elasticsearch.timeZone=Asia/Shanghai spring.elasticsearch.bboss.default.elasticsearch.ttl=2d #在控制台输出脚本调试开关showTemplate,false关闭,true打开,同时log4j至少是info级别 spring.elasticsearch.bboss.default.elasticsearch.showTemplate=true spring.elasticsearch.bboss.default.elasticsearch.discoverHost=false ##default连接池配置 spring.elasticsearch.bboss.default.http.timeoutConnection = 400000 spring.elasticsearch.bboss.default.http.timeoutSocket = 400000 spring.elasticsearch.bboss.default.http.connectionRequestTimeout=400000 spring.elasticsearch.bboss.default.http.retryTime = 1 spring.elasticsearch.bboss.default.http.maxLineLength = -1 spring.elasticsearch.bboss.default.http.maxHeaderCount = 200 spring.elasticsearch.bboss.default.http.maxTotal = 400 spring.elasticsearch.bboss.default.http.defaultMaxPerRoute = 200 spring.elasticsearch.bboss.default.http.keystore = spring.elasticsearch.bboss.default.http.keyPassword = # ssl 主机名称校验,是否采用default配置, # 如果指定为default,就采用DefaultHostnameVerifier,否则采用 SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER spring.elasticsearch.bboss.default.http.hostnameVerifier = ##logs集群配置 spring.elasticsearch.bboss.logs.name = logs spring.elasticsearch.bboss.logs.elasticUser=elastic spring.elasticsearch.bboss.logs.elasticPassword=changeme #elasticsearch.rest.hostNames=10.1.236.88:9200 spring.elasticsearch.bboss.logs.elasticsearch.rest.hostNames=127.0.0.1:9200 #elasticsearch.rest.hostNames=10.21.20.168:9200 #elasticsearch.rest.hostNames=10.180.211.27:9280,10.180.211.27:9281,10.180.211.27:9282 spring.elasticsearch.bboss.logs.elasticsearch.dateFormat=yyyy.MM.dd spring.elasticsearch.bboss.logs.elasticsearch.timeZone=Asia/Shanghai spring.elasticsearch.bboss.logs.elasticsearch.ttl=2d #在控制台输出脚本调试开关showTemplate,false关闭,true打开,同时log4j至少是info级别 spring.elasticsearch.bboss.logs.elasticsearch.showTemplate=true spring.elasticsearch.bboss.logs.elasticsearch.discoverHost=false ##logs集群对应的连接池配置 spring.elasticsearch.bboss.logs.http.timeoutConnection = 400000 spring.elasticsearch.bboss.logs.http.timeoutSocket = 400000 spring.elasticsearch.bboss.logs.http.connectionRequestTimeout=400000 spring.elasticsearch.bboss.logs.http.retryTime = 1 spring.elasticsearch.bboss.logs.http.maxLineLength = -1 spring.elasticsearch.bboss.logs.http.maxHeaderCount = 200 spring.elasticsearch.bboss.logs.http.maxTotal = 400 spring.elasticsearch.bboss.logs.http.defaultMaxPerRoute = 200 # https证书配置 spring.elasticsearch.bboss.logs.http.keystore = spring.elasticsearch.bboss.logs.http.keyPassword = # ssl 主机名称校验,是否采用default配置, # 如果指定为default,就采用DefaultHostnameVerifier,否则采用 SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER spring.elasticsearch.bboss.logs.http.hostnameVerifier = # dsl配置文件热加载扫描时间间隔,毫秒为单位,默认5秒扫描一次,<= 0时关闭扫描机制 spring.elasticsearch.bboss.dslfile.refreshInterval = -1
配置说明:
上面配置了两个集群:default和logs
每个集群配置项的前缀为:spring.elasticsearch.bboss.集群名字,其中的集群名字是一个自定义的逻辑名称,用来在client api中引用集群。
default集群的配置项前缀为:
spring.elasticsearch.bboss.default
logs集群的配置项前缀为:
spring.elasticsearch.bboss.logs
同时每个集群的配置项目里面必须包含name项目的配置
default集群name配置:
spring.elasticsearch.bboss.default.name = default
logs集群name配置:
##logs集群配置
spring.elasticsearch.bboss.logs.name = logs
4.2 定义加载多es集群配置的spring boot Configuration类
新建类MultiESSTartConfigurer
package org.bboss.elasticsearchtest.springboot; /* * Copyright 2008 biaoping.yin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.frameworkset.elasticsearch.ElasticSearchHelper; import org.frameworkset.elasticsearch.boot.BBossESStarter; import org.frameworkset.elasticsearch.client.ClientInterface; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Profile; /** * 配置多个es集群 * 指定多es数据源profile:multi-datasource */ @Configuration @Profile("multi-datasource") public class MultiESSTartConfigurer { @Primary @Bean(initMethod = "start") @ConfigurationProperties("spring.elasticsearch.bboss.default") public BBossESStarter bbossESStarterDefault(){ return new BBossESStarter(); } @Bean(initMethod = "start") @ConfigurationProperties("spring.elasticsearch.bboss.logs") public BBossESStarter bbossESStarterLogs(){ return new BBossESStarter(); } }
说明:
MultiESSTartConfigurer通过以下两个方法分别加载default和logs两个es集群的配置
default集群配置加载
@Primary @Bean(initMethod = "start") @ConfigurationProperties("spring.elasticsearch.bboss.default") public BBossESStarter bbossESStarterDefault() logs集群配置加载 @Bean(initMethod = "start") @ConfigurationProperties("spring.elasticsearch.bboss.logs") public BBossESStarter bbossESStarterLogs()
4.3 定义多es集群测试用例
多es集群测试用例MultiBBossESStartersTestCase
package org.bboss.elasticsearchtest.springboot; import org.frameworkset.elasticsearch.client.ClientInterface; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; /** * 多集群演示功能测试用例,spring boot配置项以spring.elasticsearch.bboss.集群名称开头,例如: * spring.elasticsearch.bboss.default 默认es集群 * spring.elasticsearch.bboss.logs logs es集群 * 两个集群通过 org.bboss.elasticsearchtest.springboot.MultiESSTartConfigurer加载 * 对应的配置文件为application-multi-datasource.properties文件 * 通过ActiveProfiles指定并激活多es集群配置:multi-datasource * @author yinbp [122054810@qq.com] */ @RunWith(SpringRunner.class) @SpringBootTest(classes = Application.class) @ActiveProfiles("multi-datasource") public class MultiBBossESStartersTestCase { @Test public void testMultiBBossESStarters() throws Exception { //验证环境,获取es状态 String response = serviceApiUtil.restClient().executeHttp("_cluster/state?pretty",ClientInterface.HTTP_GET); System.out.println(response); //判断索引类型是否存在,false表示不存在,正常返回true表示存在 boolean exist = serviceApiUtil.restClientLogs().existIndiceType("twitter","tweet"); System.out.println("twitter/tweet:"+exist); //判读索引是否存在,false表示不存在,正常返回true表示存在 exist = serviceApiUtil.restClientLogs().existIndice("twitter"); System.out.println("twitter:"+exist); exist = serviceApiUtil.restClientLogs().existIndice("agentinfo"); System.out.println("agentinfo:"+exist); } }
直接通过junit运行上述测试用例即可。
5.完整的demo工程
https://gitee.com/bbossgroups/eshelloword-spring-boot-starter
https://github.com/bbossgroups/eshelloword-spring-boot-starter
6 开发交流
elasticsearch技术交流群:166471282
elasticsearch微信公众号:
The best elasticsearch highlevel java rest api-----bboss
发表评论
-
一组获取Elasticsearch 索引表所有文档API使用案例
2018-11-18 16:02 3002The best elasticsearch highle ... -
Elasticsearch Scroll和Slice Scroll查询API使用案例
2018-09-16 18:49 3831Elasticsearch Scroll和Slice Scro ... -
数据库数据导入Elasticsearch案例分享
2018-09-16 18:42 6254The best elasticsearch highleve ... -
ElasticSearch DSL Script使用案例分享
2018-06-28 23:52 6169the best elasticsearch highleve ... -
Elasticsearch 6.3.0 SQL功能使用案例分享
2018-06-25 19:12 3272The best elasticsearch highleve ... -
数据库数据导入Elasticsearch案例分享
2018-06-21 22:56 433The best elasticsearch highleve ... -
ElasticSearch From-Size分页案例
2018-06-14 00:17 3376ElasticSearch From-Size分页案例 1. ... -
ElasticSearch客户端注解使用介绍
2018-05-30 00:19 2367The best elasticsearch highleve ... -
基于自定义配置文件初始化ElasticSearch客户端方法介绍
2018-05-24 18:56 1480基于自定义配置文件初始化ElasticSearch客户端方法介 ... -
Elasticsearch关键词高亮检索案例分享
2018-05-10 22:18 62141.准备工作 参考文档《集成Elasticsearch Res ... -
判断ElasticSearch索引Indice和索引类型是否存在
2018-05-05 23:54 8490The best elasticsearch highleve ... -
快速集成Elasticsearch Restful API案例
2018-04-26 14:27 3164The best elasticsearch highleve ... -
Elasticsearch source filter检索案例
2018-04-24 13:00 2217摘要: the best elasticsearch high ... -
Elasticsearch search after分页检索案例
2018-04-21 10:36 3043Elasticsearch search after分页检索案 ... -
Elasticsearch Delete/UpdateByQuery案例
2018-04-16 11:09 7313Elasticsearch Delete/UpdateByQu ... -
Elasticsearch返回父子数据关联查询案例
2018-04-13 12:36 4667在《Elasticsearch 父子关 ... -
Elasticsearch Sliced Scroll分页检索案例分享
2018-04-02 18:28 3734Elasticsearch Sliced Scroll分页检索 ... -
Elasticsearch地理位置维护及检索案例分享
2018-03-31 21:36 1684Elasticsearch地理位置信息维护及检索案例分享 1 ... -
Elasticsearch Scroll分页检索案例分享
2018-03-28 20:40 4054Elasticsearch Scroll分页检索案例分享 1 ... -
Elasticsearch Mget、GetDocSource、索引部分更新案例分享
2018-03-25 08:55 12141.前期准备 参考文档《高性能elasticsearch OR ...
相关推荐
单片机开发资源,基于51单片机的开发程序,供学习参考。
Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。
【工程源码】
Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。
Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。
2024-2030中国板端光伏连接器市场现状研究分析与发展前景预测报告
用法链接:https://menghui666.blog.csdn.net/article/details/138544047?spm=1001.2014.3001.5502 基于QT+C++实现的随机图形验证码,带有一些可人的交互与动画+源码 基于QT+C++实现的随机图形验证码,带有一些可人的交互与动画+源码 基于QT+C++实现的随机图形验证码,带有一些可人的交互与动画+源码 该项目实现了可交互的动画验证码控件,趣味性十足: 字符变换动画 噪音动画 可拖动交互
操作系统实验-基于uCore OS内含源码以及说明书可以自己运行复现.zip
2024-2030中国半导体零件清洗机市场现状研究分析与发展前景预测报告
python教程-04-获取和设置标签内容(innerHTML).ev4.rar
s 气泡图 s 面积图 s 雷达图 s 玫瑰图 s 3D图表
去白底图标
001 定期同步mysql数据到es 删除数据库记录同时删除es记录 es全文搜索分词和高亮
单片机学习代码资料
Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。
2022级高等数学A2期中试题B.doc
新手指南之玩转实验楼内含源码以及说明书可以自己运行复现.zip
基于qt图书馆里系统 框架 qt + c/c++ + csv 角色介绍 普通用户密码 qqq 123456 模块介绍 登录 主界面 子模块图书信息 (CSV数据集加载) 子模块用户信息 (CSV数据集加载) 子模块搜索模块 子模块借阅书籍 子模块归还图书 子模块查看详情 操作 子模块快速读取(自动后台加载指定的图书csv,用户csv) 子模块快速保存(自动后台保存指定的图书csv,用户cs) 子模块文件读取(两次导入,第一次选择要导入图书csv,第二次请选择需要导入的用户csv) 子模块文件导出(两次导出,第一次选择要导入图书csv,第二次请选择需要导入的用户csv) 其他 子模块个人信息 子模块退出系统 数据集设计 使用的数据集是csv