<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.or...
http://www.springframework.or...
http://www.springframework.or...d">
查了好多资料没有得到我个人觉的比较满意的解答
我的理解:xml命名空间类似写java导入的jar包
eg:<context:component-scan base-package=""></context:component-scan>
上面context标签 意思是用的下面这个url里面对应的xds文件.
xmlns:context="http://www.springframework.org/schema/context"
这样理解对吗,还请指教
问题:
(xds是什么?类似java中jar包?jar包用java写的,xds用xml写的?)
简单点说就是命名规范咯,因为xml的标签是用户自定义的,但是编译器并不能理解这些,所以用xsd来定义标签的使用规范,以保证编译器的准确识别。