码迷,mamicode.com
首页 > 编程语言 > 详细

spring命名空间

时间:2016-05-07 20:52:31      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:

作为一名入门级菜鸟的我,在刚开始学spring框架的时候,对于命名空间不是很理解,只是在跟着老师敲代码。随着后来学习的深入,慢慢了解到命名空间的意义。如果你没有引入相应的命名空间,就不能引用相应的标签。

因此,在这给大家分享一下spring中的命名空间。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"

xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">

</beans>

如果你也引入了相应的命名空间,却不能使用相应的标签,请仔细检查你的命名空间是否引用正确。

spring命名空间

标签:

原文地址:http://www.cnblogs.com/yelele/p/5469127.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!