(设置非自定义命名空间)Spring学习第五天

发布时间:2024年01月18日

非自定义命名空间

?首先引入对应命名空间的标签

在引入对应schemaLocation的映射(一对)

<?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:mvc="http://www.springframework.org/schema/mvc"  //对应命名空间的标签
       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/mvc  //对应schemaLocation的映射
       http://www.springframework.org/schema/mvc/spring-mvc.xsd">  //对应schemaLocation的映射


    

文章来源:https://blog.csdn.net/y3131954546/article/details/135633229
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。