关于spring的配置文件

来源:4-2 Spring事务处理-准备

慕仰4381305

2019-08-14 10:22:50

<?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"

       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">


spring配置文件这个头是固定的还是有时候根据需要加入新的语句呀?


写回答

1回答

芝芝兰兰

2019-08-14

同学你好。spring的文件头不是固定的。

spring的配置文件是xml,第二阶段中有讲解xml的课程,这里的xsi:schemaLocation,是指本文档里的xml元素所遵守的规范,这些规范都是由官方制定的,可以点击链接里面看版本的变动。xsd的网址还可以帮助你判断使用的代码是否合法。

如果解答了同学的疑问,望采纳~

祝学习愉快~


0

0 学习 · 4317 问题

查看课程