I Have to deploy 40 to 50 Spring Mvc project on Linux server So every project must contains Spring jar file in its lib folder
我必须在Linux服务器上部署40到50个Spring Mvc项目所以每个项目必须在其lib文件夹中包含Spring jar文件
Is there any way to keep all jar file at one one place so that all the projects could use
有没有办法将所有jar文件保存在一个位置,以便所有项目都可以使用
I have tried to placed all file in Apache-tomcat's lib folder and remove Spring's jar file from the Spring MVC's project lib folder
我试图将所有文件放在Apache-tomcat的lib文件夹中,并从Spring MVC的项目lib文件夹中删除Spring的jar文件
But after that all the url stop working and i didn't get any exception and i also compile all java files by using the
但在那之后所有的url停止工作,我没有得到任何异常,我也使用。编译所有的java文件
javac -cp :/path of Apache-tomcat's lib/*.jar: className.java
I didnt get any exception all filed compiled successfully
我没有得到所有归档成功编译的任何异常
If anyone knows how can i managed these jar files then please let me know
如果有人知道我怎么能管理这些jar文件,那么请告诉我
Should i need to define the path in projects files like web.xml or meta-inf So that When the projects run it automatically find the jar at some specific place...
我是否需要在项目文件中定义路径,如web.xml或meta-inf这样当项目运行时它会自动在某个特定位置找到jar ...
1 个解决方案
#1
0
- When you deploy web application to production server (Apache Tomcat in this case), you don't copy any JAR file for application working, because application packaged in WAR file format.
- If you want using many Spring-based web applications for development, testing purpose, you also don't need copy JAR files many times. Use Gradle or Maven dependencies management tool. (You maybe need covert legacy project to new project structure when use new generation build tools like Gralde, Maven).
将Web应用程序部署到生产服务器(在本例中为Apache Tomcat)时,不会复制任何JAR文件以使应用程序正常工作,因为应用程序以WAR文件格式打包。
如果您想要使用许多基于Spring的Web应用程序进行开发和测试,那么您也不需要多次复制JAR文件。使用Gradle或Maven依赖项管理工具。 (当使用像Gralde,Maven这样的新一代构建工具时,您可能需要将隐藏的遗留项目隐藏到新项目结构中)。
#1
0
- When you deploy web application to production server (Apache Tomcat in this case), you don't copy any JAR file for application working, because application packaged in WAR file format.
- If you want using many Spring-based web applications for development, testing purpose, you also don't need copy JAR files many times. Use Gradle or Maven dependencies management tool. (You maybe need covert legacy project to new project structure when use new generation build tools like Gralde, Maven).
将Web应用程序部署到生产服务器(在本例中为Apache Tomcat)时,不会复制任何JAR文件以使应用程序正常工作,因为应用程序以WAR文件格式打包。
如果您想要使用许多基于Spring的Web应用程序进行开发和测试,那么您也不需要多次复制JAR文件。使用Gradle或Maven依赖项管理工具。 (当使用像Gralde,Maven这样的新一代构建工具时,您可能需要将隐藏的遗留项目隐藏到新项目结构中)。