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

@ConfigProperties bean doesn't get picked up as a bean #4729

Closed
2 tasks
danielkec opened this issue Aug 12, 2022 · 0 comments · Fixed by #4853
Closed
2 tasks

@ConfigProperties bean doesn't get picked up as a bean #4729

danielkec opened this issue Aug 12, 2022 · 0 comments · Fixed by #4853
Assignees
Labels
3.x Issues for 3.x version branch bug Something isn't working config MP P2

Comments

@danielkec
Copy link
Contributor

danielkec commented Aug 12, 2022

ConfigProperties should work without extra bean defining annotation(@ApplicationScoped)
even with bean-discovery-mode="annotated"

//@ApplicationScoped
@ConfigProperties(prefix="sorcerer")
public class SorcererProperties {
    public @ConfigProperty(name="orcSlayingPotions") int potions;
    public boolean cloak;
    public String[] weapons;
}

But it doesn't

WELD-001408: Unsatisfied dependencies for type SorcererProperties with qualifiers @ConfigProperties

Passes mp config tck because tck uses empty beans.xml which is equal to bean-discovery-mode="all"

Fixes:

@danielkec danielkec changed the title @ConfigProperties bean doesn't get picked up by as a bean @ConfigProperties bean doesn't get picked up as a bean Aug 12, 2022
@barchetta barchetta added the P2 label Aug 25, 2022
@barchetta barchetta added bug Something isn't working 3.x Issues for 3.x version branch labels Aug 25, 2022
danielkec added a commit to danielkec/helidon that referenced this issue Sep 8, 2022
romain-grecourt pushed a commit that referenced this issue Sep 28, 2022
@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues for 3.x version branch bug Something isn't working config MP P2
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants