spring-projects / spring-projects/spring-data-rest
Not able to access html files When using @Import(RepositoryRestMvcConfiguration.class) [DATAREST-100]
@odrotbohm is already working on this.
Since Dec 31, 2020.
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
Sujeet Gupta opened DATAREST-100 and commented
Hi,
I am working on application Spring MVC & Data Rest.
When I am using @Import(RepositoryRestMvcConfiguration.class) on class which is extending WebMvcConfigurationSupport, then I am not able to access my html files, when removing this @Import(..), I am able to access the html files, but then the repository related things doesn't work.
This is blocking me from further development.
When I diagnosed then I found the following behavior.
When using @Import(RepositoryRestMvcConfiguration.class)
then "handleNoMatch" method of RequestMappingInfoHandlerMapping class is matching patterns which are not supposed to match.
So it matches and continues to the check "if (!consumableMediaTypes.isEmpty())" where it throws HttpMediaTypeNotSupportedException which results in 406 at the browser.
I have attached the thread_dump & values of some variables in the files.
PFA
Attachments:
- threadts_report.txt (21.90 kB)
- variable_values.txt (6.60 kB)
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.
Assessment
This issue has not been assessed yet.