Skip to content

Bug: When accessing the web page, sba-settings.js throws a 406 (Not Acceptable) error. #5662

Description

@zhujianxintian

I found that a certain Spring MVC configuration affects the access to the sba-settings.js file.

I also searched through previous issues and found that others have encountered this problem as well, but the solutions provided did not resolve my issue, or there had been no answers for a long time.

After investigation, I discovered that this is caused by the defaultContentType(MediaType.APPLICATION_JSON) setting. So I am raising an issue here.

I would like to know if you have any solution (I'm not sure if this counts as a bug, so I'm submitting it as a bug for now). Alternatively, if developers configure this, could you detect it and give a warning (either in the server logs or browser logs)?

At the very least, this issue might help others who encounter the same problem, letting them know where the problem lies and possibly helping them resolve it.

Screenshot:

Image

Reproduction demo:

Uncomment the defaultContentType(MediaType.APPLICATION_JSON) line to reproduce.

spring-boot-admin-demo.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions