How to persist data in H2 Database after node redeployment in Corda?

混江龙づ霸主 提交于 2019-12-24 20:59:08

问题


I want to persist data in Corda H2 database after Node Deployment . The data got wiped out when I redeploy the nodes again . Is there any way that my data got persistent even after I make changes in my node and deploy them ?


回答1:


Every time you run gradlew deployNodes, the node folders will be deleted and re-created, removing your data. However, there is no need to constantly re-deploy the nodes.

If you want to make changes to your nodes' configuration, simply edit the nodes' node.conf files, as described here: https://docs.corda.net/corda-configuration-file.html.

If you want to make changes to your CorDapp, you can do the following:

  • Make the required changes to your CorDapp's code
  • Run gradlew jar from the root of your CorDapp project to create an updated JAR for your CorDapp
  • Copy the new CorDapp JAR from the build/libs folder to each node's plugins/cordapps folder
  • Restarting the node's Java process


来源:https://stackoverflow.com/questions/46251932/how-to-persist-data-in-h2-database-after-node-redeployment-in-corda

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