2012-07-26 62 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