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

Kotlin bean definition DSL should provide access to getBeansOfType() [SPR-16269] #20816

Closed
spring-projects-issues opened this issue Dec 5, 2017 · 2 comments
Assignees
Labels
in: core type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Dec 5, 2017

Sébastien Deleuze opened SPR-16269 and commented

As discussed with Josh Long, Kotlin bean definition DSL should provide a way to access to a list of beans of a specific type, for example by providing a getBeansOfType() alias in BeanDefinitionContext.


Issue Links:

  • #20958 Ability to access Environment in the beans element of the Kotlin bean definition DSL
  • #21886 Replace context by provider() in Kotlin bean DSL ("is superseded by")
@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 15, 2018

Sébastien Deleuze commented

We have 2 options here: adding refs() or beansOfType() aliases or provide maximum flexibility and give access to the internal GenericApplicationContext as implemented in this draft commit with main drawback being breaking encapsulation.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Apr 12, 2018

Sébastien Deleuze commented

Fixed by this commit, I chose to give access to the context for advanced use-cases as it was available after fixing #20958. This provides a more flexible solution IMO.

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

No branches or pull requests

2 participants