问题
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:
Create a
WebServerPluginRegistry
class that lists your API (example):class MyWebPlugin : WebServerPluginRegistry { override val webApis = listOf(Function(::MyApi)) }
List the fully-qualified class name of your web plugin under
resources/META-INF/services
, in a file callednet.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