在 Java spring 中,可以将配置分成多个 xml 文件,然后使用一个从另一个导入
<import resource="importedConfig.xml"/>
如何在 SpringPython 中做同样的事情?
最佳答案
虽然似乎没有包含其他资源的选项,但您可以使用多个配置文件初始化 Spring Python:
configs = [ XMLConfig("config-1.xml"), XMLConfig("config-2.xml") ]
container = ApplicationContext( configs )
(参见 spring-python source )
关于python - Spring python : how to import another xml resource from within an xml config file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10850864/