In Corda, `No installed custom CorDapps.` on node's built-in webserver

一曲冷凌霜 提交于 2019-12-08 14:26:05

问题


I have defined a CorDapp including an API. However, when I deploy the CorDapp and run my nodes, I see the following message at the webserver URL:

No installed custom CorDapps.

How can I get my node's built-in webserver to load my API?


回答1:


For the node's built-in webserver to load the API, you must do two things:

  1. Create a WebServerPluginRegistry class that lists your API (example):

    class MyWebPlugin : WebServerPluginRegistry {
        override val webApis = listOf(Function(::MyApi))
    }
    
  2. List the fully-qualified class name of your web plugin under resources/META-INF/services, in a file called net.corda.webserver.services.WebServerPluginRegistry (example)

    • List one fully-qualified plugin class name per line


来源:https://stackoverflow.com/questions/51537592/in-corda-no-installed-custom-cordapps-on-nodes-built-in-webserver

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!