[英]How to add another project as dependency in Spring MVC
I am working on Spring MVC 3.1 project. 我正在从事Spring MVC 3.1项目。 We have two project (both projects are in same workspace):
我们有两个项目(两个项目都在同一个工作空间中):
WebApp_Project
need jar/maven of Core_Project
so we need to build the jar of Core_project and add jar using Install or deploy an artifact to a maven repo
option in STS. WebApp_Project
需要的JAR /行家Core_Project
所以我们需要建立Core_project的罐子,并使用添加JAR Install or deploy an artifact to a maven repo
的STS选项。 Any small change in Core_Project
need to repeat all this steps. Core_Project
任何小更改Core_Project
需要重复所有这些步骤。
I tried adding Dependency using artifact details of Core_project
in this way I need not to make jar and deploy into .m2 again and again. 我尝试以这种方式使用
Core_project
工件详细信息添加Dependency, Core_project
无需制作jar并一次又一次地部署到.m2中。
But when I run my project I got HTTP Status 404 -
error page. 但是,当我运行我的项目时,我得到了
HTTP Status 404 -
错误页面。
Go to the location - WEB_PROJECT folder > target > yourfile.war > WEB-INF > lib. 转到以下位置-WEB_PROJECT文件夹>目标> yourfile.war> WEB-INF> lib。 Lib folder should contain your jar file.
Lib文件夹应包含您的jar文件。
If your file is present there, your dependency is added to your WEB project. 如果您的文件在那里,则您的依赖项将添加到您的WEB项目中。 Then you will need to check your web project for 404 error.
然后,您需要检查您的Web项目是否存在404错误。
If your jar file is not present in lib project, something is going wrong with your method of adding dependency. 如果lib项目中没有jar文件,则添加依赖项的方法出了点问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.