Bean property '**DAO' is not writable or has an invalid setter method ApplicationContext.xml中配置有问题,里面的bean的属性名称写错了。 ApplicationContext.xml中写的是loginDAO,在java类里配置的bean却写成了loginDao。