spring - 无法从 Eclipse 中配置的 Tomcat 提供 webapp
问题描述
我有一个 spring 应用程序,我部署在 eclipse 中配置的 tomcat 服务器上,以及一个放置在 src/main/webapp 文件夹中的前端应用程序。上下文路径是/asig。它用于 REST 调用。
我已将 webapp 文件夹添加到部署程序集:
这是 mvn clean install 后的目标文件夹:
但是,当我启动服务器时,我无法访问我的前端应用程序。我收到 404,但我不知道为什么。我尝试了一切:https://localhost:8443/,https://localhost:8443/index.html,https://localhost:8443/asig,https://localhost:8443/asig/index.html什么都没有作品。
我到处搜索,我能找到的唯一答案就是将我的前端应用程序放在 src/main/webapp 中,一切都会正常工作......
解决方案
推荐阅读
- javascript - Java脚本键值对到对象
- reactjs - 如何在 React.js 中访问其中的集合和文档?
- php - 如何在基于 PHP 的 CRUD 应用程序中编辑表单时修复“If(isset($_POST['Id'])) 错误”?
- c# - iOS WebGL 上的 Unity 视频播放器
- algorithm - 在矩形 Young Tableau 中搜索元素的高效算法
- reactjs - 如何在 React 中将数组推送到状态?获取“传播不可迭代实例的无效尝试”
- c# - MongoDB HashTable 平均值
- android - 如何为 WorkManager 和 LocationServices 获得正确的依赖关系?
- zsh-completion - 如何让 zsh 继承完整的自动完成功能?
- rest - 无限制地从 couchbase 全文搜索 rest API 获取所有结果