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-issuemaster opened this issue Dec 5, 2017 · 2 comments
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster 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-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster 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-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.