我在 Symfony 2 应用程序中安装了SonataAdminBundle、SonataUserBundle和LiipImagineBundle 。根据他们的安装说明,我把他们的路由配置放在/app/config/routing.yml
.
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.xml"
admin:
resource: "@SonataAdminBundle/Resources/config/routing/sonata_admin.xml"
prefix: /admin
_sonata_admin:
resource: .
type: sonata_admin
prefix: /admin
sonata_user:
resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
prefix: /admin
fos_user_security:
resource: "@FOSUserBundle/Resources/config/routing/security.xml"
fos_user_resetting:
resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
prefix: /resetting
fos_user_profile:
resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
prefix: /profile
fos_user_register:
resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
prefix: /register
fos_user_change_password:
resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
prefix: /profile
当我把它们搬进时/src/MyBundle/Resources/config/routing.yml
,它们也在工作。那么,我应该把它们放在哪里?放置它们的最佳配置文件是什么?为什么?我无法决定。