堆栈跟踪:
org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.vliv.dao.MySqlLogDao] is defined: expected single matching bean but found 2: mySqlLogDaoImpl,mySqlLogDao
Java代码:
public interface MysqlDao {
public void regstr();
}
@Repository
@Transactional
public class MysqlDaoImpl {
public void regstr() {}
}
@Controller
public class Brand {
@Autowired
MySqlDao mySqlDao;//gives exception
}