我已经在 openshift tomcat 上部署了我的 war 文件。 正如建议直接部署 war 文件一样,我们需要先删除 src 和 pom.xml,然后才能将 war 文件复制到 webapps 文件夹中。 pre compiled java applications (WAR and EAR files) onto your OpenShift
现在,由于我的应用程序使用 mysql 驱动程序 - 当 tomcat 在开放类次上启动时,它会抛出找不到 mysql 驱动程序类的错误。
我还能如何将 mysql 驱动程序添加到 openshift tomcat。将它们放在 web-inf/lib 目录中不起作用,因为数据源是在 tomcat context.xml 上配置的
最佳答案
数据源配置对于 mysql 驱动程序来说应该无关紧要。然而,在 tomcat8 之前,有些情况下您必须在 tomcat/lib 中部署 mysql 驱动程序(遗憾的是它确实有效)。升级到 Tomcat8 将使您摆脱这种情况。
关于mysql - 如何将mysql驱动添加到openshift tomcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31601972/