Translation of URI segments and request parameters into aggregates broken [DATACMNS-1743]
See original GitHub issueCraig opened DATACMNS-1743 and commented
I have a controller class (annotated with @RepositoryRestController
) with this method:
@ResponseBody
@RequestMapping(method=RequestMethod.GET,value="/domainWords/search/findByDomainSetWithLocale")
public CollectionModel<EntityModel<DomainWord>> findByDomainSetAndLocale(final @NonNull @RequestParam("domainSet") DomainSet domainSet, final @NonNull @RequestParam("locale") Locale locale)
DomainSet’s repository is:
@Repository
public interface DomainSetRepository extends org.springframework.data.repository.Repository<DomainSet, Long>
The test is to request
/api/domainWords/search/findByDomainSetWithLocale?domainSet=1&locale=es_ES
With Spring Data Neumann RELEASE, that works great.
With Spring Data Neumann SR1, it fails.
With Spring Data Neumann SR1 forcing spring-data-commons to version 2.3.0.RELEASE, it fails.
Therefore, this issue is a regression in spring-data-commons 2.3.1.RELEASE. So the problem is caused somewhere in this commit range: https://github.com/spring-projects/spring-data-commons/compare/2.3.0.RELEASE...2.3.1.RELEASE
When it fails, here’s the error:
Resolved [org.springframework.web.method.annotation.MethodArgumentConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'com.isobar.mindsight.domain.DomainSet'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.isobar.mindsight.domain.DomainSet': no matching editors or conversion strategy found]
Affects: 2.2.8 (Moore SR8), 2.3.1 (Neumann SR1)
Issue Links:
- DATACMNS-1734 Delay Repositories initialization in DomainClassConverter
Backported to: 2.3.2 (Neumann SR2), 2.2.9 (Moore SR9)
2 votes, 9 watchers
Issue Analytics
- State:
- Created 3 years ago
- Comments:16
Top Results From Across the Web
Domain types in Spring MVC controller method signatures not ...
... Translation of URI segments and request parameters into aggregates broken This bug affects Spring Boot version 2.3.1, 2.2.8 and 2.1.15.
Read more >Changelog - Spring
DATACMNS-1743 - Translation of URI segments and request parameters into aggregates broken. * DATACMNS-1739 - Use standard Spring code of conduct.
Read more >Uri.Segments Property (System) | Microsoft Learn
The Segments property returns an array of strings containing the "segments" (substrings) that form the URI's absolute path. The first segment is obtained...
Read more >URI Class — CodeIgniter 3.1.13 documentation
The optional second parameter defaults to NULL and allows you to set the return value of this method when the requested URI segment...
Read more >URI Class — ExpressionEngine 6 Documentation
The URI Class provides methods that help you retrieve information from your URI ... lets you turn URI segments into an associative array...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yukihane commented
Hi. Here is my testcase.
‘
mvn clean test
’ result:It seems that this issue also affects version 2.1.x and has not been fixed
derTobsch commented
Totally forgot how you can see it. If you start the application and try to request an application for leave it will break