fix autowire feature mistake, and add autowire junit test