spring 依赖注入方式出现的问题:必须为元素类型 “constructor-arg” 声明属性 “name”。
我的bean.xml头文件:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
修改为
<?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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
我在这里出现以下错误
: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountService' defined in class path resource [bean.xml]: Unsatisfied dependency expresse