Spring自动类型绑定注入中使用autowire=“byType”不生效,无法绑定

package com.huangwz.spring.SpringDemo6;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;

public class HelloBean {
private String helloWord;
private Date date;
public String getHelloWord() {
return helloWord;
}
public void setHelloWord(String helloWord) {
this.helloWord = helloWord;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}

}

package com.huangwz.spring.SpringDemo6;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringDemo {

public static void main(String[] args) {
    ApplicationContext context=new ClassPathXmlApplicationContext("beans-config.xml");
    HelloBean helloBean=(HelloBean) context.getBean("helloBean1");
    System.out.println("word="+helloBean.getHelloWord());
    System.out.println("Date="+helloBean.getDate());
}

}



@Autowired
private service|dao sd;
//不应该是这样的吗?

在没有加上注解的情况下

beans-config.xml内容呢