Skip to content

Main server ResourceConfigCustomizers should not apply to management context #17801

@raphw

Description

@raphw

Any ResourceConfigCustomizer bean is applied within the JerseyAutoConfiguration but also in the JerseyManagementContextConfiguration. It is not currently possible to exclude the bean's application in the management context. This can be a relevant problem if the management server runs on a different port.

If a singleton resource is registered in both contexts, this breaks the singleton contract as the API is now reachable via two ResourceConfigs on two different ports.

Therefore, it should be possible to restrict the application of ResourceConfigCustomizer to the main server. Currently, it is only possible to register an API exclusively in the management server via @ManagementContextConfiguration.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions