我遵循安全主题教程,
并创建了一个传统的登录表单,从数据库中加载用户,
我已经像这样配置了routing.yml
login:
pattern: /login
defaults: { _controller: WebLoginBundle:Default:index}
login_check:
pattern: /login_check
logout:
pattern: /logout
并像这样配置了security.yml
firewalls:
login_firewall:
pattern: /login_check
anonymous: ~
secured_area:
pattern: ^/member
security: true
form_login:
login_path: /login
check_path: /login_check
logout: ~
当我提交登录表单时,我收到此异常
Unable to find the controller for path "/login_check". Maybe you forgot to add the matching route in your routing configuration?
根据symfony教程,如果/ login_check不在防火墙后面,
将抛出上述异常,但我在security.yml和routing.yml中都配置了/ login_check。
我不知道是什么原因,
有人可以帮忙吗?