spring data rest

阅读更多
post对应insert
put对应update
get对应select
delete对应delete

@RepositoryRestResource(path = "people")
public interface PersonRepository extends JpaRepository {

	@RestResource(path = "nameStartsWith", rel = "nameStartsWith")
	Person findByNameStartsWith(@Param("name") String name);

}


RepositoryRestResource设置实体对应路径
@RestResource设置方法对应路径

你可能感兴趣的:(spring,boot,restful)