当我尝试访问 localhost/Symfony/web/app_dev.php/Categoria/ 时,Symfony2 返回 No route found for "GET /Categoria/",页面 localhost/Symfony/web/app_dev.php/hello/Guido 有效。
src\grupo85\entregaFinalBundle\Resources\config\routing.yml:
grupo85entrega_final_homepage:
pattern: /hello/{name}
defaults: { _controller: grupo85entregaFinalBundle:Default:index }
应用\配置\路由.yml:
grupo85entrega_final:
resource: "@grupo85entregaFinalBundle/Resources/config/routing.yml"
prefix: /
grupo85entregaFinalBundle:
resource: "@grupo85entregaFinalBundle/Controller/"
type: annotation
prefix: /
php 应用程序/控制台路由:调试
categoria GET ANY ANY /categoria/
categoria_create POST ANY ANY /categoria/
categoria_new GET ANY ANY /categoria/new
categoria_show GET ANY ANY /categoria/{id}
categoria_edit GET ANY ANY /categoria/{id}/edit
categoria_update PUT ANY ANY /categoria/{id}
categoria_delete DELETE ANY ANY /categoria/{id}
我还尝试运行 cache:clear --env prod 命令并手动删除 pp/cache 文件夹。怎么了?谢谢。