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

fix(mvc): api response content type converts to xml #377

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

smallsheeeep
Copy link
Contributor

What type of PR is this?

type-bug

What this PR does / why we need it:

After the #338 commit was merged, I find the api response is converted into XML format, causing the ODC server cannot be used by front-end.
In this PR, I fix this issue by set application/json as the default content type by implements the WebMvcConfigurer:

    @Override
    public void configureContentNegotiation(ContentNegotiationConfigurer config) {
        config.defaultContentType(MediaType.APPLICATION_JSON, MediaType.ALL);
    }

@smallsheeeep smallsheeeep added type-bug Something isn't working priority-exigency labels Sep 20, 2023
@smallsheeeep smallsheeeep added this to the ODC 4.2.2 milestone Sep 20, 2023
@smallsheeeep smallsheeeep self-assigned this Sep 20, 2023
@smallsheeeep smallsheeeep changed the title fix: xml response fix(mvc): api response content type converts to xml Sep 20, 2023
Copy link
Contributor

@yizhouxw yizhouxw left a comment

Choose a reason for hiding this comment

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

lgtm

@smallsheeeep smallsheeeep merged commit 63c3657 into dev/4.2.x Sep 21, 2023
10 checks passed
@smallsheeeep smallsheeeep deleted the bugfix/gaoda_42x_fix_xml_response branch September 21, 2023 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-exigency type-bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants