kotlin gradle core web vertx IDEA 2.1 2.2

这篇博客介绍了如何使用Kotlin语言,结合Gradle构建工具和Vert.x框架创建Web应用程序。首先,它引导读者访问Kotlin和Vert.x的官方网站获取资源。接着,展示了如何在IntelliJ IDEA中配置Gradle项目,特别是应用'application'插件以添加运行配置,并管理构建时和运行时的依赖。此外,还提到了设置主类名和将目录标记为源代码的过程。最后,提到了在IntelliJ IDEA中快速导入和注释代码的快捷方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


kotlin 官网

http://kotlinlang.org/

package hello
fun main(args: Array<String>) {
   println("Hello World!")
}


vertx官网

http://vertx.io/

Documentatio各种文档

http://vertx.io/docs/

web application examples.

https://github.com/vert-x3/vertx-examples/tree/master/web-examples


gradleplugin 查找插件

https://plugins.gradle.org/

shadow

https://plugins.gradle.org/search?term=shadow


intelij IDEA  gradle构建项目

build.gradle 构建配置文件

apply plugin: 'application' 添加 application  就有run了

buildscript.dependencies 构建时的依赖

dependencies 运行时的依赖

mainClassName = 'io.vertx.core.Launcher' 项目启动的入口类


intelij IDEA

 make directory as source 标记文件的类别,文件夹右键 

kotlin 进入函数方式:control+单击

import io.vertx.ext.web.Router 添加import方式 alt+enter

// 选中注释多行代码 control+/







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值