我有一个大型 .NET DLL 库,我想在基于 Java 的应用程序的新上下文中利用/重用它。
我的第一个想法就是用 MVC Web 应用程序包装 DLL 库,该应用程序将通过简单的基于 REST 的服务调用来公开它们。
每个 DLL 都包含一个实现相同标准接口(interface)的类,因此使用 DLL 命名约定和传入的相同参数进行单个服务调用应该能够帮助加载 DLL,不是吗?
最佳答案
是的,应该可以。确保使用工厂模式并传递一些 key 或某种逻辑来使用正确的 DLL。
<小时/>May I know what is the result of the program from the DLL's. Just in case if it doesn't return any data from the DLL only some backend updates or writes to the disk or server, then simply create an exe file and call from java application. This will be less expensive than a web call.
关于java - 从基于 Java 的应用程序访问 .NET DLL,服务包装器是否可以接受?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54811932/