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

QuarkusComponentTest: provide API to turn a class that is not annotated with a scope into a bean #35313

Closed
mkouba opened this issue Aug 10, 2023 · 0 comments · Fixed by #35719
Labels
area/testing kind/enhancement New feature or request
Milestone

Comments

@mkouba
Copy link
Contributor

mkouba commented Aug 10, 2023

Description

Quarkus allows extensions to add a scope annotation to any class with AutoAddScopeBuildItem, or a custom AnnotationsTransformer. Moreover, an extension can also produce a BeanDefiningAnnotationBuildItem to extend the default set of bean defining annotations. As a result, many components do not define a scope annotation but rely on the default configuration.

We should provide an alternative API for similar functionality so that it's not necessary to modify the original components under test. We could also preconfigure some typical use cases (JAX-RS resources, classes with @Scheduled, etc.).

Implementation ideas

No response

@mkouba mkouba added kind/enhancement New feature or request area/testing labels Aug 10, 2023
mkouba added a commit to mkouba/quarkus that referenced this issue Sep 4, 2023
- introduce JaxrsSingletonTransformer to add Singleton to a JAX-RS
component that has no scope
- resolves quarkusio#35313
@quarkus-bot quarkus-bot bot added this to the 3.4 - main milestone Sep 5, 2023
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Feb 8, 2024
- introduce JaxrsSingletonTransformer to add Singleton to a JAX-RS
component that has no scope
- resolves quarkusio#35313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant