I have a simple (ant based) test based on AbstractTransactionalTestNGSpringContextTests. I get an error complaining no suitable bean found for auto wiring.
@Autowired
@Qualifier("userSessionDao")
private UserSessionDAO userSessionDao;
The DAO:
@Repository("userSessionDao")
public class UserSessionDAOImpl extends
AbstractGenericDAOImpl<UserSession, Long> implements UserSessionDAO {
/**
*
*/
@SuppressWarnings("unused")
private XLogger logger = XLoggerFactory.getXLogger(UserSessionDAOImpl.class
.getName());
}
I have the following in the config.xml:
< context:component-scan base-package=”com.blah” />
Am I missing a step to make component-scan kick in?
Try
<context:component-scan base-package="com.blah.*" />Also, check that
UserSessionDAOis an autowired candidate.