Why Axon's command-bus bean can use @Autowired ???

the XSD defined a command-bus use SimpleCommandBus by hardcoding in BeanParser, but still can use @Autowired annotation to inject them into others. WHY?
i do the same thing, but the error occurs : No beans of ‘XXX’ type found.

I think I don’t completely understand the question. @Autowired is a Spring mechanism. The command-bus element (in xml config) creates an instance of SimpleCommandBus, but that’s an implementation detail. If you simply depend on a CommandBus (interface), you should be fine.

The No beans of type ‘XXX’ found error is usually an error in your spring configuration.