Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在 Corda 的流程中调用 Web 服务时遇到问题。它不支持 UTF-8,当请求超出流程时,编码将被更改。我该如何启用它?
通过将环境变量“JAVA_TOOL_OPTIONS”设置为“-Dfile.encoding=UTF8”解决了这个问题。实际上,它也应该可以在 Corda 中使用属性选项进行设置。
而不是在环境变量中设置编码值。它可以直接应用于 gradle 中的 javaCompile 选项:
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }