Skip to content

InjectionPoint/DependencyDescriptor as injectable argument for @Bean methods [SPR-14033] #18605

Closed

Description

@spring-projects-issues

Juergen Hoeller opened SPR-14033 and commented

As of 4.3, we have a rather simple InjectionPoint class as a base class for DependencyDescriptor, primarily used for exception reporting purposes. However, it would also be well suited as an argument for @Bean methods, along the lines of the CDI InjectionPoint argument on an @Produces method.

This has been raised in a comment on our recent 4.3 core container blog post: http://spring.io/blog/2016/03/04/core-container-refinements-in-spring-framework-4-3#comment-2551909782
A CDI example raised there: http://buraktas.com/cdi-dependency-injection-producer-method-example/


Issue Links:

Referenced from: commits a95bf6e

Activity

  1. EndzeitBegins commented on Nov 18, 2021

    @EndzeitBegins

    While trying to migrate our Beans to the function bean definition DSL, we failed to migrate Beans that rely on an InjectionPoint for their creation.
    More information can be found in this question on StackOverflow

    Does Spring support this use case yet? Either by providing the InjectionPoint oder accessing the required information otherwise?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions