关于spring的配置
来源:2-4 搭建项目
焰痕
2020-05-17 13:25:15
?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">
这个配置以后到底怎么弄?
还有这是关于什么的spring配置?
1回答
同学你好
1
这个是配置文件的约束头文件,同学可以从老师的项目中进行粘贴
或者也可以去官网中找对应的头文件
选择对应的版本:
找到
往下拉,找到这样的示例,copy里边的头文件就好了。
但这样比较麻烦,建议同学直接保存老师项目提供的做一下备份就好
一般比较常用的也就这些
例如你写了:spring-beans 等实际上是用来约束以及提示对应标签的:
同理:spring-context.xsd 等是用来约束以及提示
<context></context> 等
这些头约束文件同学可以都写上,也可以用哪些就写上哪些。
如果我的回答解决了你的疑惑,请采纳!祝学习愉快!
相似问题