Failed to convert from type [java.lang.String] to type [java.lang.Long] for Spring JPA?
The solution is shown below.
I wrongly use this url http://localhost:8080/api/states/findByCountryCode?code=BR
Convert url
http://localhost:8080/api/states/findByCountryCode?code=BR`
to
http://localhost:8080/api/states?code=BR
Spring Boot Get Request: Failed to convert type java.lang.String to required type int
The problem was that autogenerated methods automatically get /search prefix.
Answer: http://localhost:8081/posts/search/byAuthorId?page=1&size=1&authorId=1
Related Topics
Notifydatasetchanged() Makes the List Refresh and Scroll Jumps Back to the Top
Java Simpledateformatter With 10 Decimals After the Seconds, Cannot Convert to Date
How to Retrieve Element Value from Soap Response Using Java
How to Scroll to the Bottom of a Recyclerview? Scrolltoposition Doesn't Work
Crudrepository and Hibernate: Save(List<S>) VS Save(Entity) in Transaction
Default Value in Lombok. How to Init Default With Both Constructor and Builder
Alternative to If-Else Statements or Better Approach
Prevent Empty Values on String Split
How to Set a Maximum Height With Wrap Content in Android
Java Check If a String Is Valid Json or Valid Xml or Neither
@Valid Annotation Is Not Working as Expected
Java.Io.Filenotfoundexception: the System Cannot Find the File Specified
How to Return a Custom Object from a Spring Data JPA Group by Query
Select the Letters After - in a String
How to Exit an Android App Programmatically