Skip to content

Could CDI support an annotation-based alternative for discovery mode? #867

@muchiri08

Description

@muchiri08

Hi,
Lately I have been studying CDI (from the docs and I love it) and some example codes provided would fail until I added the bean xml file. The whole point of adding it was changing the discovery mode to all. Could CDI support an annotation-based alternative for discovery mode? For example:

@BeanDiscovery(DiscoveryMode.ALL) //hypothetical
public class AppConfig{}

Is this technically feasible within CDI’s architecture?

If not could there also be a work around? Like META-INF/cdi-config.properties and inside it have jakarta.cdi.discovery-mode=ALL

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationSpecification docs improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions