Neo4j 的只读事务

Readonly transactions with Neo4j

使用 Spring @Transactional(readOnly = true) 和 Neo4j/Neo4j Spring 数据有什么好处吗?我应该将只读事务标记为 @Transactional(readOnly = true) 还是不标记?

自 SDN 4.2(撰写本文时为 4.2.RC1)起,您可以使用只读事务。

As of SDN 4.2 you can also define read only transactions.

You can start a read only transaction by marking a class or method with @Transactional(readOnly=true).

http://docs.spring.io/spring-data/data-neo4j/docs/4.2.x/reference/html/#_read_only_transactions