codecentric / codecentric/spring-boot-admin
Bug: When accessing the web page, `sba-settings.js` throws a 406 (Not Acceptable) error.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.9k
- Forks
- 3.1k
- Avg merge
- 19h 1m
- Merged PRs (30d)
- 61
Description
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:
Reproduction demo:
Uncomment the defaultContentType(MediaType.APPLICATION_JSON) line to reproduce.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached spring-boot-admin-demo and uncomment defaultContentType(MediaType.APPLICATION_JSON) to reproduce the 406 response for sba-settings.js. Trace how that request is served and decide whether the behavior should be corrected or clearly warned about; done means the configured scenario is handled or documented with a verified warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100