vertx - 从属性/配置文件中读取 [英] vertx - reading from property/config file
本文介绍了vertx - 从属性/配置文件中读取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从属性文件中读取数据?我了解 vertx 使用.json"文件来存储数据,但不确定如何从属性/配置文件创建 JsonObject.
How to read data from property files? I understand vertx uses '.json' files for storing data but not sure how to create JsonObject from property/config file.
我想将服务器端口、连接 URL、数据库名称等保留在配置文件中.
I would like to keep, server port, connection url, db name etc. in to a config file.
推荐答案
你应该在io.vertx.core.Launcher
上运行你的verticle,然后你可以添加conf选项-conf config.panser.json
you should run your verticle over io.vertx.core.Launcher
, then you could add conf option -conf config.panser.json
这篇关于vertx - 从属性/配置文件中读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文