Most of the examples are available in all the languages that Vert.x supports.

You’ll find the examples for the relevant language in a directory src/main/${lang} where lang is an identifier for the

language, e.g. java, js, ruby etc.

For example you’ll find the Vert.x core Java examples in core-examples/src/main/java and you’ll find the Vert.x core

JavaScript examples in core-examples/src/main/js

Note

All the non-Java examples are automatically generated from the Java examples using our magic code translator.

Running the examples

Running in your IDE

Most of the Java examples can be run directly in your IDE (if you have one!).

We provide a main() method in most of the example classes which allows you to conveniently run them directly in your IDE.

Just right click the main method or class in your IDE and run as…​ application (supported by all major IDEs).

Running at the command line

If vertx is installed you can also run any verticle directly on the command line. This way of working may be of interest

to you, if you don’t want to use Maven or Gradle or perhaps you don’t use an IDE.

Or perhaps you’re just a command line kind of person.

If you’re coming from using other platforms such as Node.js you might want to work this way. You can think of the

vertx command as a bit like the node command in Node.js.

Instructions for installing Vert.x are in the next section.

Once Vert.x is installed, to run an example, just cd to the example directory and type vertx run followed by the filename

of the verticle. For example

cd core-examples/src/main/java/io/vertx/example/core

vertx run EchoServer.java

cd core-examples/src/main/js/echo

vertx run echo_server.js

Yes! You can run Java source files directly using Vert.x (no compilation required).

Installing Vert.x

Note

This is only necessary if you want to run Vert.x at the command line. If you’d prefer to work with Maven or

Gradle projects then you don’t need to pre-install Vert.x - you just let Maven/Gradle pull in the Vert.x dependencies

into your project as you would with any dependency.

Pre-requisites: You will need to have Java 8 JDK installed.

Unzip it somewhere on your disk (e.g. in your home directory)

Set your PATH environment variable to include the installation directory

Test the install by typing vertx -version.

On the download page, you will find several distributions. Each distribution has a different set

of components:

Min: The min distribution contains only Vert.x Core, the support of the different

languages, and the Hazelcast clustering.

Full: The full distribution contains all the components of the Vert.x stack. It includes

Vert.x web and the different data access technologies.

Vert.x core examples

The Vert.x core examples contains a wide range of examples using just Vert.x Core.

Vert.x-Web examples

Vert.x-Web is a toolkit for building web applications using Vert.x

The Vert.x-Web examples contains a wide range of examples using Vert.x-Web

Vert.x Web Client examples

Vert.x Web Client that provides an easy to use web client for Vert.x.

The Vert.x Web Client examples contains a wide range of examples using the Vert.x Web Client

Vertx Unit examples

Vertx-Unit is a library for writing asynchronous tests. We include some examples of how to use this tool to test

your Vert.x (or other asynchronous) applications.

The Vert.x Unit examples shows how to use Vert.x Unit.

Vert.x JUnit 5 examples

The vertx-junit5 modules allow testing Vert.x asynchronous operations with JUnit 5.

RxJava examples

Vert.x for RxJava provides most of its APIs as RxJava so you can use those if you prefer.

RxJava is a great choice when you want to perform complex operations on multiple asynchronous streams of data.

The Vert.x RxJava 2 / Vert.x RxJava 1 examples contains a wide range of examples using Vert.x for RxJava

gRPC examples

The Vert.x gRPC Examples show how you can implement a gRPC service and invoke a gRPC service with Vert.x.

Kotlin examples

The Vert.x Kotlin Examples shows a few examples with Kotlin such a REST application,

Kotlin coroutines and usage of KotlinTest.

Mail examples

The Vert.x Mail examples

contains a few examples using Vert.x Mail

The mail examples show different ways to create the mail message and send it via

tls, ssl etc. The examples either use localhost:25 to send a mail or use host

mail.example.com. To actually run the examples you will have to change the

mail server and the user credentials in the MailLogin example.

Maven Service Factory examples

The Vert.x Maven service factory examples shows how to package a verticle that

can be deployed using the Maven Service Factory. Such a deployment is also demonstrated using either the command line

or the api.

Service Proxy Examples

The Vert.x Service Proxy examples contains an example of service proxy usage.

It depicts how a service provider can be implemented and how the published service can be consumed.

OSGi Examples

The Vert.x OSGi examples contains a few examples using Vert.x in an OSGi context.

Cloud Foundry examples

The Vert.x Cloud Foundry example shows how to deploy Vert.x application to a Cloud Foundry service or platform of your choice.

Docker examples

The Vert.x Docker examples shows how to deploy Vert.x application in Docker containers.

It also contains an example of the application that can be deployed on Fabric8.

Openshift & Kubernetes examples

The Vert.x OpenShift 3 examples shows how to deploy Vert.x applications on

Openshift 3 and Kubernetes. It also demonstrates clustering and service discovery.

Spring Examples

The Vert.x Spring Examples shows how vert.x application can be integrated inside a Spring

ecosystem.

Redis example

The Vert.x Redis Example shows how you can interact with Redis using the vert.x Redis client.

Mongo example

The Vert.x Mongo Example shows how you can interact with MongoDB using the vert.x Mongo client.

Reactive SQL client example

The Reactive SQL Client Examples shows how you can interact PostgreSQL or MySQL Databases using the Reactive SQL client.

JDBC example

The Vert.x JDBC Examples shows how you can interact JDBC Databases using the vert.x JDBC

client.

Kafka example

The Vert.x Kafka Examples shows how you can interact Kafka using the vert.x Kafka

client.

MQTT example

The Vert.x MQTT Examples shows how you can write MQTT servers and clients using Vert.x MQTT.

Service Proxy Examples

The Vert.x Service Proxy examples contains an example of service proxy usage.

It depicts how a service provider can be implemented and how the published service can be consumed.

AMQP Bridge examples

The Vert.x AMQP Bridge Examples show how you can interact with AMQP 1.0 servers using the Vert.x AMQP Bridge.

Java 9 examples

This Java 9 examples shows how a simple Java 9 modular application using Vert.x as anonymous modules.

Vert.x fatjar examples

The Vert.x fatjar Examples show how you can build fatjar with Maven or Gradle.

HTTP/2 Showcase

This HTTP/2 Showcase application highlights the benefits of HTTP/2 when dealing with latency on the web.

Camel Bridge examples

The Vert.x Camel Bridge Examples show how you can use Apache Camel routes from

the event bus.

JCA example

The Vert.x JCA Examples provide a JEE compliant application that enables to you deploy the application into a

Wildfly application server. While simple in implementation, the JCA examples

provides a good point of departure for your own development.

Micrometer metrics examples

The Vert.x Micrometer metrics examples show how to collect Vert.x metrics

with Micrometer and send them to backends such as Prometheus or InfluxDB.

GraphQL examples

The Vert.x Web GraphQL examples contain simple client/server GraphQL applications built with Vert.x Web GraphQL and the GraphQL-Java library.

vertx rx java_光魔科技相关推荐

  1. 光云科技快麦ERP正式入选阿里云原生合作伙伴计划,赋能企业“新基建”

    近日,杭州光云科技有限公司(股票简称:光云科技,股票代码:688365)与阿里云签订了"云原生合作伙伴计划协议",成为首批入驻的解决方案伙伴,阿里云解决方案伙伴具备自主解决方案,或 ...

  2. 还在用Excel做报表?建议你试试这个数据填报系统_光点科技

    随着数据时代的发展,无论您是从事研究还是从事商业,您都将面临各种各样的数据类型,数据填报的困难,以及计算复杂性的增加.如此这样一来,大家用Excel手工表来处理分析这些庞杂的数据信息,显得自己有点力不 ...

  3. 财务数据填报怎样做?用这个报表工具轻松搞定!_光点科技

    伴随着大数据的发展,对于大公司来说,报表的数据填报以及数据合并是一个很费时费力的过程,许多公司都有多个 ERP 和其他财务系统,因此提供报表集成.公司间交易.自动结算账户.公司和分账簿核对资产负债表的 ...

  4. 如何对大数据进行分析和处理?_光点科技

    大数据时代已经来临,所以我们对大数据这个词已经不再陌生,甚至于大数据已经作为一门前沿科学,成为广大高校开展招生的热门专业,其前景良好并且内容广泛.其实,如果想要深入理解大数据没有想象的那么难,须对大数 ...

  5. 大数据应用要经得起考验,不可盲目跟风_光点科技

    一项大数据应用,如果不是经得起推敲的,那就值得怀疑它是不是优秀的大数据应用,是不是有可利用的价值,是不是值得将人力物力财力花费在其中.所以,必须对大数据应用进行必要的筛选,做一定的检验之后才可以做出具 ...

  6. 有赞VS光云科技,电商SaaS的未来殊途同归

    两套逻辑,一个结果 作者:赵满满 校对:吴梦雄 后疫情时代,电商仍旧热点不断. 去中心化的电商利用私域流量,营销效果出奇得好,甚至在房地产领域也取得了成绩,抖音.快手"团购式直播带货&quo ...

  7. 从育碧、工业光魔归来,做原创国漫!20年动画人徐健的CG路

    做属于自己的原创动画--这或许是大部分动画人的梦想. 上海优塔数码(UDA)创始人徐健,已经在CG行业摸爬滚打了20年.他曾在Ubisoft育碧上海和蒙特利尔做了5年游戏美术组长,但做动画的热忱一直怀 ...

  8. 整数有约 | 光彻科技:AI智能体测系统,体育老师的减负神器,来了!

    如果有这样一款机器,能在没有老师监考的情况下,公平公正客观的测出一个班所有人的体育成绩,你能否想象出它是什么样子?它需要用到哪些技术来完成?它能帮体育老师完成哪些事情?它对中国的健康教育.素质教育有哪 ...

  9. 详解工业光魔动作捕捉神器iMoCap

     本文转载自http://page.renren.com/vfx/note/843064044 iMoCap是工业光魔公司(ILM)在制作<加勒比海盗2>时研发的动作捕捉系统,它与之前 ...

最新文章

  1. 样式集(六)仿微信通讯录样式
  2. iOS 点击推送消息跳转指定界面 —总结篇
  3. mysql计算1天后的时间_mysql 计算某个时间,多少天后,多少个月后时间戳
  4. phpstorm设置xdebug调试
  5. 深度相机(七)--体感设备对比
  6. Java移位运算符详解实例
  7. 【C++】平方矩阵求解
  8. 线性代数学习笔记(七)——克莱姆法则
  9. VScode直接执行ts文件
  10. python兔子繁殖问题
  11. 美通企业日报 | 麦德龙在重庆开第4家店;假日品牌在华第100家酒店开业
  12. JDBC userenv('LANG')
  13. TAM: TEMPORAL ADAPTIVE MODULE FOR VIDEO RECOGNITION ∗
  14. 【MM VS价】移动平均价V标准价格S(一)
  15. 全新第 13 代英特尔酷睿处理器发布,多线程性能提升 41%
  16. 微信公众号的前端热门文章及链接(不定期更新)
  17. 南京沁恒推出的国产 M3 架构芯片与意法半导体 M3 芯片对比
  18. 《Python核心编程》第5章 数字 练习
  19. HJ70 矩阵乘法计算量估算 ——
  20. matlab中清除command window的命令是什么?

热门文章

  1. 大咖专栏 | 我在DevCloud做需求
  2. 海外社媒运营,推特内容营销
  3. Scala中的ArrayBuffer(创建可变数组)
  4. 我的前端学习之路<表格表单标签>
  5. java 新浪邮箱_使用javamail发送邮件,sina的邮箱作为发信人不行
  6. 聚焦世界互联网大会 | 移动5G+,让客户看得懂,定的了!
  7. 项目设计-基于SpringBoot和Vue开发的会议室预定系统
  8. springBoot的注解
  9. Python计算机视觉——图像处理基础
  10. 赛思信安:实现数据全生命周期管理