Skip to content

Expose HttpHandler Decoration as a bean #26502

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

Closed
wants to merge 7 commits into from
Closed

Expose HttpHandler Decoration as a bean #26502

wants to merge 7 commits into from

Conversation

sp00m
Copy link
Contributor

@sp00m sp00m commented Feb 3, 2021

Follows the development that has been done for #25633.

Having the httpHandlerDecorator as a bean allows easier integration with Spring Boot, see HttpHandlerAutoConfiguration.

I wasn't sure what version to put in @since Javadoc tags.

Let me know what you think.

@pivotal-issuemaster
Copy link

@sp00m Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@sp00m Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 3, 2021
@sp00m sp00m changed the title Http handler decorator bean httpHandlerDecorator as a bean Feb 3, 2021
@rstoyanchev
Copy link
Contributor

Something like this would be fine.

@rstoyanchev rstoyanchev self-assigned this Feb 4, 2021
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Feb 4, 2021
@rstoyanchev rstoyanchev added this to the 5.3.4 milestone Feb 4, 2021
@rstoyanchev rstoyanchev changed the title httpHandlerDecorator as a bean Expose HttpHandler Decoration as a bean Feb 4, 2021
@rstoyanchev
Copy link
Contributor

A couple of things I'll probably adjust. 1) we'd want to allow multiples of these, and 2) it should be named something other than Decorator for consistency with other such types in our web code which normally are implementations of the target type (HttpHandlerDecoratorFactory perhaps).

@sp00m
Copy link
Contributor Author

sp00m commented Feb 5, 2021

@rstoyanchev, thanks for the review, updated as proposed, let me know.

import java.util.Collections;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.BiFunction;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, just noticed those modifications. IntelliJ reordered them on my behalf, let me know if you want me to revert them to reduce the diff. I use IntelliJ's default config FYI.

This was referenced Mar 11, 2021
@sp00m sp00m deleted the http-handler-decorator-bean branch February 9, 2022 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants