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

Fix example for @ImportResource in the reference manual #33446

Closed
Riteshranga99 opened this issue Aug 29, 2024 · 3 comments
Closed

Fix example for @ImportResource in the reference manual #33446

Riteshranga99 opened this issue Aug 29, 2024 · 3 comments
Assignees
Labels
type: documentation A documentation task
Milestone

Comments

@Riteshranga99
Copy link

Riteshranga99 commented Aug 29, 2024

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 29, 2024
@bclozel
Copy link
Member

bclozel commented Aug 29, 2024

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

@bclozel bclozel added status: waiting-for-feedback We need additional information before we can continue type: documentation A documentation task labels Aug 29, 2024
@sbrannen
Copy link
Member

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.

@sbrannen sbrannen removed status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 29, 2024
@sbrannen sbrannen self-assigned this Aug 29, 2024
@sbrannen sbrannen added this to the 6.1.13 milestone Aug 29, 2024
@sbrannen sbrannen changed the title Wrong class name in last example of composing java-based configurations Fix example for @ImportResource in the reference manual Aug 29, 2024
@sbrannen
Copy link
Member

Hi @Riteshranga99,

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

I revised that example in 61b5b1e.

Cheers,

Sam

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

No branches or pull requests

4 participants