I have an interface called WordDao, an abstract class impl called WordDaoImpl. And some impl class extends that abstract class.
I use same variable name when I inject them.
ex:
@Component("subjectService")
public class SubjectDaoImpl extends WordDaoImpl;
@Autowired
private WordDao subjectService;
Everything work well before I add feign. my feign client is a interface extends WordDao.
like this:
@FeignClient("Noun")
public interface NounClient extends WordDao;
Now all my @Autowired class are inject feign client.
I tried to remove "extends WordDao" from my feign client and it work well again, but I don't know why.
My question is: Is feign has top priority when inject? Isn't spring @autowired pick impl class by name(try to match variable and class/Component name)?