почему я всегда получаю исключение userDetailDao null при выполнении:
package com.springweb.service;
import com.springweb.dao.UserDetailDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.dao.DataAccessException;
import org.springframework.security.userdetails.UserDetails;
import org.springframework.security.userdetails.UserDetailsService;
import org.springframework.security.userdetails.UsernameNotFoundException;
public class UserService implements UserDetailsService
{
@Autowired
UserDetailDao userDetailDao;
public UserDetails loadUserByUsername(String string) throws UsernameNotFoundException, DataAccessException {
return userDetailDao.queryForUser(string);
}
}
в моей конфигурации безопасности Spring:
<security:authentication-provider user-service-ref="userService">
<security:password-encoder hash="md5" />
</security:authentication-provider>
<bean name="userService" class="com.springweb.service.UserService">
</bean>
и в моем контексте диспетчера я уже определил для сканирования пакета:
<context:component-scan base-package="com.springweb"/>