问题描述
Jigsaw项目的概念指南介绍了在导出同一包的两个自动模块之间的桥梁". 1
The concept guide of Project Jigsaw introduces "a bridge between two automatic modules exporting the same package". 1
事实上,如其github中所述,目前两个自动模块grpc.api
和grpc.context
都导出了io.grpc
包. 2
In fact, currently both of two automatic modules grpc.api
and grpc.context
export io.grpc
package, as is reported in its github. 2
bridge 似乎是将Jigsaw应用于具有这些库的项目的确切解决方案,但是文档并没有提供实现它的任何具体方法.
The bridge seems to be the exact solution to apply Jigsaw for a project with these libraries, but the documentation does not offer any concrete way to achieve it.
是否有用于此目的的javac
命令选项?或者,是否有建议的方法可以克服这种情况?
Is there any javac
command option for this purpose? Or, is there any recommended way to overcome this situation?
谢谢!
推荐答案
在此项目中 和 在此 我已经实现了Reinhold规定的具体应用„ 通往类路径的桥 您在问题中链接到的文档.
In this project and in this one I have implemented a concrete application of what Reinhold prescribes in that „Bridges to the class path" documentation you linked to in your question.
除了这两种基于桥接的方法之外,我还能够使用 --patch-module
命令行选项来解决Springfox和gRPC问题.
In addition to those two bridge-based approaches, I've also been able to solve both the Springfox and the gRPC issues using the --patch-module
command line option.
但是,即使 --patch-module
是克服拆分程序包情况的更直接方法,它也是" 强烈劝阻 …
这篇关于如何合并两个自动模块,在Project Jigsaw中导出相同的包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!