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

Add methods to disable (or enable) Jersey feature auto-discovery #415

Closed
sleberknight opened this issue Dec 15, 2023 · 1 comment · Fixed by #416 or #417
Closed

Add methods to disable (or enable) Jersey feature auto-discovery #415

sleberknight opened this issue Dec 15, 2023 · 1 comment · Fixed by #416 or #417
Assignees
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Milestone

Comments

@sleberknight
Copy link
Member

Add new methods in StandardEnvironmentConfigurations to control whether Jersey feature auto-discovery is (globally) enabled or disabled.

This will allow an easy way to disable Jersey feature auto-discovery, e.g., because of a conflict with a component such as the Glassfish jersey-media-json-jackson library, which relies on the auto-discovery mechanism to register the Glassfish JacksonFeature. If this library is present in a Dropwizard application (e.g., via a transitive dependency) it can conflict with Dropwizard's own JacksonFeature.

We have seen this happen in practice, specifically it overrode our configuration to serialize Java 8 date/time classes like Instant as milliseconds. Instead, it caused serialization with nanosecond precision, e.g. 1702612731.473160000 instead of 1702612731473 (for 2023-12-15T03:58:51.473160Z).

@sleberknight sleberknight added the new feature A new feature such as a new class, method, package, group of classes, etc. label Dec 15, 2023
@sleberknight sleberknight added this to the 3.3.0 milestone Dec 15, 2023
@sleberknight sleberknight self-assigned this Dec 15, 2023
sleberknight added a commit that referenced this issue Dec 15, 2023
* Add two methods to StandardEnvironmentConfigurations which
  provide an easy way to control whether Jersey feature
  auto-discovery is enabled or disabled.

Closes #415
terezivy pushed a commit that referenced this issue Dec 15, 2023
* Add methods to control Jersey feature auto-discovery

* Add two methods to StandardEnvironmentConfigurations which
  provide an easy way to control whether Jersey feature
  auto-discovery is enabled or disabled.

Closes #415

* Mark JerseyFeatureStatus enum and two new methods as Beta
sleberknight added a commit that referenced this issue Dec 15, 2023
* Fix my mistake mis-naming the Jersey feature auto-discovery methods
* They were incorrectly named with "Jackson" instead of "Jersey"
* The incorrect names were never published in a release, so there are no breaking changes

Closes #415
@sleberknight
Copy link
Member Author

Re-opening because I misnamed the methods in the original PR with "Jackson" in them, when they should have had "Jersey".

@sleberknight sleberknight reopened this Dec 15, 2023
sleberknight added a commit that referenced this issue Dec 15, 2023
* Fix my mistake mis-naming the Jersey feature auto-discovery methods
* They were incorrectly named with "Jackson" instead of "Jersey"
* The incorrect names were never published in a release, so there are no breaking changes

Closes #415
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Projects
None yet
1 participant