2012-07-26 87 views
0

一切工作昨天,但現在我得到這個得到錯誤,而登錄的Symfony2

Unable to find the controller for path "/login_check". Maybe you forgot to add the matching route in your routing configuration? 

我有這樣的代碼

secured_area: 
      pattern: ^/admin 
      anonymous: ~ 
      form_login: 
       login_path: /login 
       check_path: /login_check 

此路由

xxxxxxxx: 
    resource: "@myBundle/Controller" 
    type:  annotation 


xxxxxxxx: 
    resource: "@myBundle/Controller" 
    type:  annotation 
    prefix: /secured 

,我需要做的更多設置

回答

0

檢查您是否有在你的路由

_security_check: 
    pattern: /login_check 

而且還要檢查,如果這條路線不被任何其他

編輯覆蓋:

你必須把防火牆後面的check_path。意思是:

check_path: /admin/login_check 
+0

我以前沒有那樣,以及一切正常。我是否需要那條路線 – user825904 2012-07-27 02:22:00

+0

更新了我的答案 – 2012-07-27 07:04:00