上一篇文章 Springboot+Neo4j 初级框架搭建(一) 我们完成了系统的搭建,这篇文章我们来谈谈Neo4j的增删改查基本操作。
在dao层我们继承了Neo4jRepository<T,ID>,这里其实已经帮我们实现了大部分对Neo4j数据库的操作,查看源码中Neo4jRepository<T,ID>继承PagingAndSortingRepository<T,ID>和CrudRepository<T,ID>,PagingAndSortingRepository<T,ID> 主要是实现了分页和排序的功能,CrudRepository<T,ID>主要实现基础的增删改查
@NoRepositoryBean
public interface CrudRepository<T, ID> extends Repository<T, ID> {
<S extends T> S save(S var1);
<S extends T> Iterable<S> saveAll(Iterable<S> var1);
Optional<T> findById(ID var1);
boolean existsById(ID var1);
Iterable<T&