1. 程式人生 > >【bug】使用spring+struts2註解開發,提示” There is no Action mapped for namespace [/] and action name [xxxxx.action] associated with context path []”

【bug】使用spring+struts2註解開發,提示” There is no Action mapped for namespace [/] and action name [xxxxx.action] associated with context path []”

there 提示 就是 技術分享 文件夾路徑 iat class bubuko ring

使用註解開發,通過spring管理struts2容器,配置文件沒有問題,前臺路徑無誤

錯誤提示:

There is no Action mapped for namespace [/] and action name [foreAction_sendCode] associated with context path []

技術分享圖片

解決:

action路徑對應的方法類,應放在XXX.action.xxx文件夾下,也就是文件夾路徑必須有action這一層,否則會無法找到action和namespace

【bug】使用spring+struts2註解開發,提示” There is no Action mapped for namespace [/] and action name [xxxxx.action] associated with context path []”