Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Autowire场景查找spring注入类型有误 #30

Closed
john-70 opened this issue May 18, 2023 · 2 comments
Closed

@Autowire场景查找spring注入类型有误 #30

john-70 opened this issue May 18, 2023 · 2 comments

Comments

@john-70
Copy link

john-70 commented May 18, 2023

@autowire优先找到类型符合的bean。但是在下例中,会错误得找到LoginService

public class LoginNewController {
    @Autowired
    private LoginNewService loginService;

    public void login() {
        loginService.login();
    }
}

@Service
public class LoginService {
    public void login() {

    }
}

@Service
public class LoginNewService {
    public void login() {

    }
}
@Adrninistrator
Copy link
Owner

这两天周末,我改一下这个问题

@Adrninistrator
Copy link
Owner

已解决,最新版本1.0.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants