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

Recognize Consumer<ServerBuilder> beans for spring autoconfiguration #2070

Merged
merged 1 commit into from Sep 16, 2019

Conversation

anuraaga
Copy link
Collaborator

@anuraaga anuraaga commented Sep 12, 2019

I think it's useful to be able to customize with spring without using custom types, for example to allow creating a plugin module that just configures a server without needing to worry about armeria-spring. It's sort of similar to how Spring supports both custom annotations and javax.inject annotaions.

Idea came up in openzipkin-contrib/zipkin-storage-kafka#38

/cc @adriancole @jeqo

@ikhoon ikhoon added this to the 0.92.0 milestone Sep 12, 2019
@codefromthecrypt
Copy link
Contributor

thanks so much for always sweeping up the feedback, Rag!

@codecov
Copy link

codecov bot commented Sep 12, 2019

Codecov Report

Merging #2070 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2070      +/-   ##
============================================
- Coverage     73.79%   73.72%   -0.07%     
+ Complexity     9391     9387       -4     
============================================
  Files           817      817              
  Lines         36121    36124       +3     
  Branches       4452     4452              
============================================
- Hits          26654    26632      -22     
- Misses         7168     7189      +21     
- Partials       2299     2303       +4
Impacted Files Coverage Δ Complexity Δ
...ecorp/armeria/spring/ArmeriaAutoConfiguration.java 80% <100%> (+1.42%) 10 <2> (+2) ⬆️
...rp/armeria/server/tomcat/ManagedTomcatService.java 50.84% <0%> (-22.04%) 6% <0%> (-1%)
.../linecorp/armeria/internal/IdleTimeoutHandler.java 80% <0%> (-20%) 4% <0%> (-1%)
...armeria/server/tomcat/Tomcat90ProtocolHandler.java 48.14% <0%> (-14.82%) 11% <0%> (-4%)
...meria/common/stream/RegularFixedStreamMessage.java 81.63% <0%> (-6.13%) 13% <0%> (-1%)
.../linecorp/armeria/server/tomcat/TomcatService.java 63.82% <0%> (-2.66%) 24% <0%> (-1%)
.../linecorp/armeria/client/Http1ResponseDecoder.java 60% <0%> (-1.74%) 25% <0%> (-1%)
...inecorp/armeria/server/HttpResponseSubscriber.java 83.88% <0%> (-0.48%) 64% <0%> (-1%)
...com/linecorp/armeria/server/HttpServerHandler.java 80.4% <0%> (-0.34%) 80% <0%> (ø)
.../linecorp/armeria/client/Http2ResponseDecoder.java 61.66% <0%> (+0.83%) 33% <0%> (+1%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 379d0e8...5161f03. Read the comment docs.

Copy link
Collaborator

@trustin trustin left a comment

Choose a reason for hiding this comment

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

Never knew that is possible. :-)

Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

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

Nice idea! Thanks.

Copy link
Member

@minwoox minwoox left a comment

Choose a reason for hiding this comment

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

👍

@trustin trustin changed the title Recognize Consumer<ServerBuilder> beans for spring autoconfiguration. Recognize Consumer<ServerBuilder> beans for spring autoconfiguration Sep 16, 2019
@trustin trustin merged commit d89c801 into line:master Sep 16, 2019
eugene70 pushed a commit to eugene70/armeria that referenced this pull request Oct 16, 2019
…ine#2070)

I think it's useful to be able to customize with spring without using custom types, for example to allow creating a plugin module that just configures a server without needing to worry about armeria-spring. It's sort of similar to how Spring supports both custom annotations and `javax.inject` annotaions. 

Idea came up in openzipkin-contrib/zipkin-storage-kafka#38
fmguerreiro pushed a commit to fmguerreiro/armeria that referenced this pull request Sep 19, 2020
…ine#2070)

I think it's useful to be able to customize with spring without using custom types, for example to allow creating a plugin module that just configures a server without needing to worry about armeria-spring. It's sort of similar to how Spring supports both custom annotations and `javax.inject` annotaions. 

Idea came up in openzipkin-contrib/zipkin-storage-kafka#38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants