作者:百变精灵2596 | 来源:互联网 | 2023-05-30 06:02
1.开启组件扫描
xmlns:cOntext="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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-beans.xsd">
2.添加注解实现bean的自动创建。