目录
解析XML配置
bean标签的解析
解析XML配置
首先把一个配置文件封装成一个Resource对象,然后获取Resource对象的输入流,转换成InputSource对象,最后解析成Document对象。
复制代码
1
2
3
4
5
6
7
8public int loadBeanDefinitions(String location, Set<Resource> actualResources) throws BeanDefinitionStoreException { ResourceLoader resourceLoader = getResourceLoader(); if (resourceLoader instanceof ResourcePatternResolver) { // Resource pattern matching available. try { //这里的location就是配置文件-applicationContext.xml,转成Resource对象
最后
以上就是聪明黄蜂最近收集整理的关于Spring解析xml的全部内容,更多相关Spring解析xml内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复