一、使用准备
1.1、导入约束 :context约束
![在这里插入图片描述](https://img-blog.csdnimg.cn/9300ebca54fa4ef3af073ae289116b8d.png)
1.2、配置注解的支持:context:annotation-config
沿用上一篇博客项目!
<?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/con