依赖:

    <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-rest</artifactId>
        </dependency>

 

 

repository :

@RepositoryRestResource(collectionResourceRel = "bookingMain", path = "bookingMain")
public interface BookingMainRepository extends JpaRepository<BookingMainDO, String>{

}

 

 

test rest  接口:

 

posted on 2019-04-29 12:34  lshan  阅读(468)  评论(0编辑  收藏  举报