jpa @RepositoryRestResource
依赖:
<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 接口: