You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

JBoss 6.4.14中REST服务无法访问(404错误)求助

求助:JBoss部署Spring REST服务后出现404错误

我正在跟着一份教程搭建自己的第一个REST服务,没有用默认的Tomcat,而是选了JBoss 6.4.14作为应用容器。

目前已完成的步骤

  • 成功生成了war包,并且已经放到JBoss的standalone/deployments目录下,部署目录的状态如图所示:
    JBoss部署目录中的war包

遇到的问题

当我尝试调用服务地址 http://localhost:8081/SpringRestService/rest/payment/pay?key=SHARED_KEY 时,直接返回了404错误,错误页面的完整内容如下:

<html> 
<head> 
<title>JBWEB000065: HTTP Status 404 - /SpringRestService/rest/payment/pay</title> 
<style> 
<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--> 
</style> 
</head> 
<body> 
<h1>JBWEB000065: HTTP Status 404 - /SpringRestService/rest/payment/pay</h1> 
<HR size="1" noshade="noshade"> 
<p> 
<b>JBWEB000309: type</b> JBWEB000067: Status report 
</p> 
<p> 
<b>JBWEB000068: message</b> <u>/SpringRestService/rest/payment/pay</u> 
</p> 
<p> 
<b>JBWEB000069: description</b> <u>JBWEB000124: The requested resource is not available.</u> 
</p> 
<HR size="1" noshade="noshade"> 
</body> 
</html>

请求的详细信息截图如下:
请求详情截图

我现在完全搞不清问题出在哪里,希望各位能帮忙分析排查,非常感谢!


内容的提问来源于stack exchange,提问作者Caznik

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 04:22:24