<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 31  文章 - 2  trackbacks - 0
    做為spring的新手,很愿意嘗試這樣的優秀框架,但最近做項目時,總是碰到惱人的問題
    為了做到零配置用到了ControllerClassNameHandlerMapping,訪問預先設定好的url,總會出現No?mapping?for?[/springT/registration.hr]?in?DispatcherServlet?with?name?'Dispatcher'

    1?
    2??????<!--?SpringMVC相關Bean配置?-->?
    3????<bean?class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/>?
    4????<!--?以下為Controller?-->??
    5????<bean?id="registrationController"?class="com.RegistrationController"/>
    6?????<bean?id="userController"?class="com.UserController"?scope="request"/>

    看似Controller都已經注入到Spring中:

    2010-07-17?15:48:23?Registering?Controller?'registrationController'?as?handler?for?URL?path?[/registration]
    2010-07-17?15:48:23?Creating?shared?instance?of?singleton?bean?'registrationController'
    2010-07-17?15:48:23?Creating?instance?of?bean?'registrationController'
    2010-07-17?15:48:23?Eagerly?caching?bean?'registrationController'?to?allow?for?resolving?potential?circular?references
    2010-07-17?15:48:23?Finished?creating?instance?of?bean?'registrationController'
    2010-07-17?15:48:23?Mapped?URL?path?[/registration]?onto?handler?[com.RegistrationController@1a2af25]
    2010-07-17?15:48:23?Registering?Controller?'userController'?as?handler?for?URL?path?[/user]

    訪問debug錯誤信息如下:

    12010-07-17?15:49:50?Looking?up?handler?for?[/registration.hr]
    22010-07-17?15:49:50?No?mapping?for?[/springT/registration.hr]?in?DispatcherServlet?with?name?'Dispatcher'

    通過多方努力,同事的幫助下,發現是缺包spring-web.jar、spring-webmvc.jar,也真搞笑,缺兩個包居然沒有錯誤,特此記錄

    12010-07-17?16:55:00?Rejected?bean?name?'org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping#0':?no?URL?paths?identified
    22010-07-17?16:55:00?Creating?shared?instance?of?singleton?bean?'registrationController'
    32010-07-17?16:55:00?Creating?instance?of?bean?'registrationController'
    42010-07-17?16:55:00?Eagerly?caching?bean?'registrationController'?to?allow?for?resolving?potential?circular?references
    52010-07-17?16:55:00?Finished?creating?instance?of?bean?'registrationController'
    62010-07-17?16:55:00?Mapped?URL?path?[/registration*]?onto?handler?[com.RegistrationController@4dc957]
    72010-07-17?16:55:00?Mapped?URL?path?[/user*]?onto?handler?[userController]


    中間最大的差異就是
    正確:
    ???Mapped?URL?path?[/registration*]?onto?handler?[com.RegistrationController@4dc957]
    錯誤:
    ???Mapped?URL?path?[/registration]?onto?handler?[com.RegistrationController@1a2af25
    posted on 2010-07-17 18:29 緣來如此 閱讀(4308) 評論(0)  編輯  收藏 所屬分類: ssh
    主站蜘蛛池模板: 亚洲日本在线免费观看| 亚洲最大的黄色网| 中文毛片无遮挡高清免费| 国产一精品一aⅴ一免费| 久久亚洲精品国产亚洲老地址 | 精品多毛少妇人妻AV免费久久| 日韩视频在线免费观看| 亚洲AV成人无码网天堂| 国产免费变态视频网址网站 | 亚洲人成在线精品| 桃子视频在线观看高清免费完整| 亚洲永久中文字幕在线| 国产免费丝袜调教视频| 亚洲日本天堂在线| 亚洲高清视频一视频二视频三| 一级毛片在线播放免费| 亚洲av日韩av激情亚洲| 久草免费在线观看视频| 国产AV旡码专区亚洲AV苍井空| 免费无码又爽又刺激毛片| 麻豆安全免费网址入口| 国产亚洲精品福利在线无卡一| 久久精品中文字幕免费| xxx毛茸茸的亚洲| 亚洲AV无码一区二区三区在线观看| 精品人妻系列无码人妻免费视频| 在线播放亚洲第一字幕| 1000部拍拍拍18勿入免费视频软件 | 国产乱子精品免费视观看片| 亚洲精品国产精品| 亚洲精品成人无限看| 免费看片在线观看| 日韩久久无码免费毛片软件| 久久亚洲精品无码AV红樱桃| 日韩a在线观看免费观看| 你是我的城池营垒免费看| 亚洲人成网站看在线播放| 亚洲国产中文字幕在线观看| 最新黄色免费网站| 无忧传媒视频免费观看入口| 亚洲精品免费在线|