rest - Unable to import Spring RepositoryRestResource -


i trying implement rest based mongodb service through spring, have run trouble. cannot import library.

i have in class:

package main;  import java.util.list;  import org.springframework.data.mongodb.repository.mongorepository; import org.springframework.data.repository.query.param; import org.springframework.data.rest.core.annotation.repositoryrestresource;  @repositoryrestresource(collectionresourcerel = "people", path = "people") public interface personrepository extends mongorepository<person, string> {      list<person> findbylastname(@param("name") string name);  } 

but import org.springframework.data.rest.core.annotation.repositoryrestresource; not working reason , giving me error: the import org.springframework.data.rest cannot resolved

this maven pom.xml:

<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">     <modelversion>4.0.0</modelversion>     <groupid>userregistrationservices</groupid>     <artifactid>userregistrationservices</artifactid>     <version>0.0.1-snapshot</version>     <packaging>war</packaging>      <!-- inherit defaults spring boot -->     <parent>         <groupid>org.springframework.boot</groupid>         <artifactid>spring-boot-starter-parent</artifactid>         <version>1.2.5.release</version>     </parent>      <properties>         <java.version>1.8</java.version>     </properties>      <dependencies>         <!-- dependencies of web application -->         <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-data-rest</artifactid>         </dependency>          <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-data-mongodb</artifactid>         </dependency>     </dependencies>      <build>         <plugins>             <!-- spring boot maven support -->             <plugin>                 <groupid>org.springframework.boot</groupid>                 <artifactid>spring-boot-maven-plugin</artifactid>             </plugin>         </plugins>     </build> </project> 

also, directly following guide: http://spring.io/guides/gs/accessing-mongodb-data-rest/

how can resolved? thanks

edit pom.xml.... , add these lines inside <dependencies></dependencies>...

<dependency>         <groupid>org.springframework.boot</groupid>         <artifactid>spring-boot-starter-data-rest</artifactid>         <version>1.2.5.release</version> 


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

android - Pass an Serializable object in AIDL -