-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make Quarkus REST Jackson beans ApplicationScoped #45408
Conversation
This comment has been minimized.
This comment has been minimized.
0cd30eb
to
56ee6c1
Compare
This comment has been minimized.
This comment has been minimized.
Instead of the default Dependant scope
56ee6c1
to
1e63ad9
Compare
Status for workflow
|
@@ -163,7 +164,9 @@ AdditionalBeanBuildItem beans() { | |||
// just because it's a bean. | |||
// Whether it is used in RESTEasy Reactive is determined elsewhere | |||
.addBeanClass(FullyFeaturedServerJacksonMessageBodyWriter.class) | |||
.setUnremovable().build(); | |||
.setDefaultScope(DotNames.APPLICATION_SCOPED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if @Singleton
would be a better match 🤔. You would not need the no-args constructors and it should be slightly better perf-wise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would mean that all dependencies would be created too, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but that's what happens with @Dependent
right now... Nevertheless, @ApplicationScoped
should be fine too ;-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go with @ApplicationScoped
then :)
Instead of the default Dependant scope