你能列出一些关于如何从eclipse运行Vertical或将我引导到源的步骤吗?我无法在任何地方找到明确的步骤。
使用maven原型创建和构建项目,如下所述:http://vertx.io/maven_dev.html#generate-the-project
例如,使用以下maven命令:mvn archetype:generate -Dfilter = io.vertx:-DgroupId = com.mycompany -DartifactId = my-module -Dversion = 0.1
参考:http://www.smartjava.org/content/create-simpe-restful-service-vertx-20-rxjava-and-mongodb
从Eclipse运行Verticle有/无外部配置文件。
我使用垂直方式部署了HttpServer,但为了简单起见,我采用了一个简单的垂直方式。如果您不想传递config,只需从下面给出的命令中删除-conf参数。
假设我有一个名为SimpleVerticle.java的类
我的项目结构是这样的。
我的垂直代码如下。
import io.vertx.core.AbstractVerticle;
public class SimpleVerticle extends AbstractVerticle{
@Override
public void start() {
System.out.println("In Simple Verticle Start Method");
System.out.println("the port configuration is : "+config().getInteger("http.port",8080));
}
}
我的Config文件如下所示:
{
"http.port" : 8082
}
现在你所要做的就是,第1步:右键单击Verticle文件,选择RunAs - > Run Configurations Step2:在主选项卡的Main Class字段中,输入qazxsw poi
步骤3:在Arguments选项卡的Program Arguments字段中,输入以下内容,
io.vertx.core.Launcher
run com.tutorial.venu.SimpleVerticle -conf src/main/conf/vertx-myapp-conf.json
然后单击Run !!
Boom,您可以使用从配置文件中获取的配置项来部署Verticle。
最好的选择是Vert.x Google Group:
http://vertx.io/blog/automatic-redeployment-in-eclipse-ide/
在那里,您可以从Tim Fox和其他核心开发人员那里获得答案。
至于你的Eclipse问题,我假设你找到了这个页面: