【问题标题】:In Corda, `No installed custom CorDapps.` on node's built-in webserver在 Corda 中,`No installed custom CorDapps.` on node's built-in webserver
【发布时间】:2019-01-03 09:02:07
【问题描述】:

我已经定义了一个包含 API 的 CorDapp。但是,当我部署 CorDapp 并运行我的节点时,我在网络服务器 URL 上看到以下消息:

No installed custom CorDapps.

如何让节点的内置网络服务器加载我的 API?

【问题讨论】:

    标签: corda


    【解决方案1】:

    为了让节点的内置 webserver 加载 API,你必须做两件事:

    1. 创建一个列出您的 API (example) 的 WebServerPluginRegistry 类:

      class MyWebPlugin : WebServerPluginRegistry {
          override val webApis = listOf(Function(::MyApi))
      }
      
    2. resources/META-INF/services 下的一个名为net.corda.webserver.services.WebServerPluginRegistry (example) 的文件中列出您的网络插件的完全限定类名

      • 每行列出一个完全限定的插件类名

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-12-11
      • 2022-12-02
      • 2022-12-01
      • 2023-04-11
      • 2022-12-02
      • 2023-02-24
      • 2021-10-24
      相关资源
      最近更新 更多