标签: java java-ee
假设我的WebLogicEndPoint.class网络应用程序中有2个类WebSphereEndpoint.class和Java。
WebLogicEndPoint.class
WebSphereEndpoint.class
Java
当我在WebLogic或Websphere中部署此应用程序时,我需要根据服务器加载特定的类,并且必须避免使用另一个,否则如果两个类都加载,则部署将失败。
WebLogic
Websphere
请给我一些建议来实现这一点。
答案 0 :(得分:0)
您可以使用Factory模式根据环境加载所需的类。