The column code is as follows

@Component
@ConditionalOnMissingBean(value = ILogin.class)
public class LoginImpl implements ILogin {
}

I'm pretty sure Context doesn't have an instance of ILogin. Why can't LoginImpl be instantiated?

@RestController
@RequestMapping("login")
public interface ILogin {

    @PostMapping
    IRestResponse<?> login(@RequestBody @Validated LoginAccount account);
}

When I post ask "/login". return Not Found "/login"

Comment From: snicoll

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

(Please review the javadoc of @ConditionOnMissingBean).

Comment From: liubinduo

I think it's a Bug, @Component and @Service annotations can be scanned and registered by @ComponentScan, and @conditiononmissingBean should be able to control.

Comment From: snicoll

Component scanning has no notion of reproducible ordering and that's not the problem here. Supporting this consistently means we'd have to "wait" to apply the condition. Your example is very basic but it would fall apart very quickly if there were two candidates for that type.