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

Controller advice exception content type #6099

Merged

Conversation

gytis
Copy link

@gytis gytis commented Dec 11, 2019

Fixes #5816

cc @geoand

@geoand
Copy link
Contributor

geoand commented Dec 11, 2019

Thanks Gytis!

I'll take a look soon.

Can you please squash the commits though?

@gytis
Copy link
Author

gytis commented Dec 11, 2019

I was planning to squash them after the review, thought it make it easier for you to review the changes. But if you prefer, I could squash them now.

@geoand
Copy link
Contributor

geoand commented Dec 11, 2019

You can go ahead and squash, reviewing shouldn't be a problem.

@geoand geoand self-assigned this Dec 11, 2019
@geoand geoand added the area/spring Issues relating to the Spring integration label Dec 11, 2019
@geoand
Copy link
Contributor

geoand commented Dec 11, 2019

I took a quick look at it and it looks good! But of course I'll need to spend more time with it.

@gytis gytis force-pushed the controller-advice-exception-content-type branch 2 times, most recently from ddaf068 to f168677 Compare December 11, 2019 17:24
@geoand
Copy link
Contributor

geoand commented Dec 12, 2019

Seems like the imports are not sorted:

[ERROR] Failed to execute goal net.revelc.code:impsort-maven-plugin:1.2.0:check (check-imports) on project quarkus-spring-web: Imports are not sorted in /home/vsts/work/1/s/extensions/spring-web/runtime/src/main/java/io/quarkus/spring/web/runtime/ResponseContentTypeResolver.java -> [Help 1]

So what you need to do is basically do an mvn process-resources and the just commit the changes

@gytis gytis force-pushed the controller-advice-exception-content-type branch from f168677 to 9cfdca1 Compare December 12, 2019 07:09
@geoand
Copy link
Contributor

geoand commented Dec 12, 2019

Thanks for the updates @gytis!

I'll try and a proper review soon

@gsmet
Copy link
Member

gsmet commented Dec 12, 2019

@geoand I'll let you tell me if you want that backported.

@geoand
Copy link
Contributor

geoand commented Dec 12, 2019

@gsmet I hope to be able to review tomorrow and hopefully we can get it in for backporting

@geoand
Copy link
Contributor

geoand commented Dec 12, 2019

@geoand
Copy link
Contributor

geoand commented Dec 12, 2019

Excellent work if I may say so @gytis! Once you take care of the minor comments I have we can get this in.

@gytis
Copy link
Author

gytis commented Dec 13, 2019

@gytis this part of the docs should also be updated: https://github.com/quarkusio/quarkus/blob/master/docs/src/main/asciidoc/spring-web.adoc#L247

Hmm, it's a bit tricky, because we've only changed @ExceptionHandler content type for controller advice.

@gytis gytis force-pushed the controller-advice-exception-content-type branch from 9cfdca1 to d178624 Compare December 13, 2019 11:30
@geoand
Copy link
Contributor

geoand commented Dec 13, 2019

@gytis this part of the docs should also be updated: https://github.com/quarkusio/quarkus/blob/master/docs/src/main/asciidoc/spring-web.adoc#L247

Hmm, it's a bit tricky, because we've only changed @ExceptionHandler content type for controller advice.

OK let's leave it as is for now

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

Thanks a lot @gytis!!!

@geoand geoand added this to the 1.2.0 milestone Dec 13, 2019
@geoand geoand added backport? triage/waiting-for-ci Ready to merge when CI successfully finishes labels Dec 13, 2019
@geoand geoand merged commit 34a5deb into quarkusio:master Dec 13, 2019
@gsmet gsmet removed the backport? label Dec 13, 2019
@gsmet gsmet modified the milestones: 1.2.0, 1.1.0 Dec 13, 2019
@gytis gytis deleted the controller-advice-exception-content-type branch May 7, 2020 14:18
@snowdrop-bot snowdrop-bot mentioned this pull request May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spring Issues relating to the Spring integration triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Take controller method into account for setting content-type in @RestControllerAdvice
3 participants