一、Spring中Ioc的常用注解
如果选择注解加xml开发首先,要更改其配置文件的约束,其次在配置文件中要告知扫描的包,如下
<?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