0
我們寫了一個服務控制器,用於春季這就好比是提供休息服務---休息服務無法正常工作在JBoss EAP 6.0
@Controller
public class ServicesController {
//first service
@ResponseBody
@RequestMapping(value = "/emailDomainValidate", method = RequestMethod.POST, headers = { jsonContentType })
public List<String> emailDomailValidate(@RequestBody EmailDomainValidateVO emailDomainValidate) {
List<String> errorCodes = getEmailDomainValidationService().emailDomainValidation(
emailDomainValidate);
}
//second service
@ResponseBody
@RequestMapping(value = "/changePassword", method = RequestMethod.POST, headers = { jsonContentType })
public List<String> changePassword(@RequestBody ChangePasswordVO changePasswordVO) {
List<String> passwords = getChangePasswordFacade().changePassword(changePasswordVO);
}
}
在web.xml中,我們提供了
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/service/*</url-pattern>
</servlet-mapping>
當我們通過發出休息電話訪問其中一項服務時---- http://「url」:8080/service/emailDomainValidate ---這是工作
但是當我們訪問其他服務時 h TTP:// 「網址」:8080 /服務/ changePassword ---這是不工作,並給了我們400 HTTP錯誤代碼
我們已經執行了到目前爲止的步驟是----
- 刪除服務器的臨時目錄。
- 調動
- 改變輸入VO級的服務,這是不工作---- ChangePasswordVO
請讓我這是爲什麼時提供的所有其他服務工作
仍無法正常工作非常感謝
感謝jyore回答,提到的服務其餘的工作,所以不認爲它必須與問題提供的映射 – Abhi
此問題僅在獨立執行時與Jboss集羣環境一起出現,它的工作原理完美無缺 – Abhi