spring-guides / gs-accessing-data-neo4j

Accessing Data with Neo4j :: Learn how to persist objects and relationships in Neo4j's NoSQL data store.
http://spring.io/guides/gs/accessing-data-neo4j/
Apache License 2.0
29 stars 49 forks source link

Add PersonRepository#findByTeammatesName and use it #36

Closed talkingscott closed 4 years ago

talkingscott commented 4 years ago

The guide already refers to findByTeammatesName and its use in main(), but the code does not match the text. This PR adds that method to the repository class and uses it in the CommandLineRunner. I additionally call System.exit(0) from main() as otherwise active threads leave the application running after the return.

Buzzardo commented 4 years ago

I asked Greg Turnquist to review this one, too. We don't usually add an exit call.

talkingscott commented 4 years ago

Messaging with Redis calls exit, which is where I got the idea. I see that Messaging with RabbitMQ calls close: SpringApplication.run(MessagingRabbitmqApplication.class, args).close();. That looks more idiomatic.