我可以用以下方法重新获取其他路由配置:
AcmeTestBundle:
resource: "@AcmeTestBundle/Resources/config/routing.xml"
prefix: /
相同的配置在XML中看起来如何?
我试过了:
<route id="AcmeTestBundle">
<default key="_ressource">AcmeTestBundle/Resources/config/routing.xml</default>
</route>
但这不起作用......
答案 0 :(得分:1)
查看官方手册
http://symfony.com/doc/current/book/routing.html#including-external-routing-resources
在那里,您可以单击名为“XML”的选项卡
<!-- app/config/routing.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<import resource="@AcmeHelloBundle/Resources/config/routing.xml" />
</routes>