python - Spring python : how to import another xml resource from within an xml config file

标签 python spring

在 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/

相关文章:

Spring REST Controller 不处理 gzip 压缩输入

java - 如何为 token 设置资源 ID?

Python ctypes 堆栈损坏

python - 类型错误 : 'fill_value= xx ' is not present in this Categorical's categories

python - 复杂排序字典到排序列表

java - 在界面中使用@RequestMapping 是不是一个坏主意?

java - 使用 Spring REST 的自定义错误响应

java - 无法懒惰地初始化角色集合,..无法初始化代理 - 无 session - JPA + SPRING

Python Pyramid 强制下载,无需在浏览器中打开文件

python - 嵌套函数定义和范围(UnboundLocalError)