spring data rest

post corresponds to insert
put corresponds to update
get corresponds to select
delete corresponds to delete

@RepositoryRestResource(path = "people")
public interface PersonRepository extends JpaRepository<Person, Long> {

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

}


RepositoryRestResource sets the corresponding path of the entity
@RestResource sets the corresponding path of the method

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326572188&siteId=291194637