The last example code in composing java-based configurations is showing below as TransferService.

public static void main(String[] args) {
    ApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);
    TransferService transferService = ctx.getBean(TransferService.class);
    // ...
}

But in the example for this the class name is DataSource.

Comment From: bclozel

Can you share a link to the documentation section? Our reference documentation is quite large...

Comment From: sbrannen

The example is at the end of the composing-configuration-classes.adoc document.

It would appear that the example is simply incomplete, since there is no TransferService bean configured for the ApplicationContext.

I'll see if I can rework that to make sense.

Comment From: sbrannen

Hi @Riteshranga99,

Thanks for raising the issue, and congratulations on opening your first GitHub issue ever! 👍

I revised that example in 61b5b1edd8d0358cb143d618691c87b9fd54f639.

Cheers,

Sam