java - Spring Data Couchbase Unable to load view -
Text after "
We are using the spring data couch-based project and when executing an existing view in the output running below error Trying to
HTTP status 500 - org.springframework.dao.InvalidDataAccessResourceUsageException: Could not load the design "_design / foo" view "fooCount"; The nested exception is com.couchbase.client.protocol.views.InvalidViewException: The design document "_design / foo" is not able to load the view for our spring data store definition
Public interface FooRepository extends CrudRepository & LT; Foo, string & gt; {@View (designDocument = "_design / foo" VIEWNAME = "fooCount") public long fooCount (); } Can someone provide an example of how to execute a query using thoughtful ideas? An example of this tax is decreased
I got the answer to this question.
1) The name of the Repository Finder method must be started with "Search" for pre-findFooByName.
2) "fooByName" should be present in a scene named couch-based production mode in order to execute it successfully
The public interface FooRepository extends CrudRepository. & Lt; Foo, string & gt; {From public list & lt; Foo & gt; FindFooByName (query query); }
Comments
Post a Comment