是否可以在routing.yml中添加多个资源?
我试过这个,但只加载了第一个:
#routing.yml
myApp:
resource: '../../src/Module1/Controller'
resource: '../../src/Module2/Controller'
type: annotation
prefix: /myApp
答案 0 :(得分:2)
是的,但每个资源应该是一个单独的条目:
foo:
resource: '../../src/Module1/Controller'
type: annotation
prefix: /myApp
bar:
resource: '../../src/Module2/Controller'
type: annotation
prefix: /myApp