package com.ft.spikes;

import com.ft.spikes.models.Person;
import com.ft.spikes.repositories.PersonRepository;
import org.neo4j.io.fs.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories;

import java.io.File;

@SpringBootApplication
@Import(Neo4jConfiguration.class)
public class Neo4jRepositoryApplication implements CommandLineRunner {

    @Autowired
    PersonRepository personRepository;

    public void run(String... args) throws Exception {

//        Person greg = new Person("Greg");
//        Person roy = new Person("Roy");
//        Person craig = new Person("Craig");
//
//        System.out.println("Before linking up with Neo4j...");
//        for (Person person : new Person[] { greg, roy, craig }) {
//            System.out.println(person);
//        }
//
//            personRepository.save(greg);
//            personRepository.save(roy);
//            personRepository.save(craig);
//
//            greg = personRepository.findByName(greg.name);
//
//            System.out.println("Lookup each person by name...");
//            for (String name : new String[] { greg.name, roy.name, craig.name }) {
//                System.out.println(personRepository.findByName(name));
//            }
//
////            System.out.println("Looking up who works with Greg...");
////            for (Person person : personRepository.findByTeammatesName("Greg")) {
////                System.out.println(person.name + " works with Greg.");
////            }

    }

    public static void main(String[] args) throws Exception {
        FileUtils.deleteRecursively(new File("accessingdataneo4j.db"));

        SpringApplication.run(Neo4jRepositoryApplication.class, args);
    }
}
@@ -775,1025 +775,8 @@
  %7B%0A%0A
-//        Person greg = new Person(%22Greg%22);%0A//        Person roy = new Person(%22Roy%22);%0A//        Person craig = new Person(%22Craig%22);%0A//%0A//        System.out.println(%22Before linking up with Neo4j...%22);%0A//        for (Person person : new Person%5B%5D %7B greg, roy, craig %7D) %7B%0A//            System.out.println(person);%0A//        %7D%0A//%0A//            personRepository.save(greg);%0A//            personRepository.save(roy);%0A//            personRepository.save(craig);%0A//%0A//            greg = personRepository.findByName(greg.name);%0A//%0A//            System.out.println(%22Lookup each person by name...%22);%0A//            for (String name : new String%5B%5D %7B greg.name, roy.name, craig.name %7D) %7B%0A//                System.out.println(personRepository.findByName(name));%0A//            %7D%0A//%0A////            System.out.println(%22Looking up who works with Greg...%22);%0A////            for (Person person : personRepository.findByTeammatesName(%22Greg%22)) %7B%0A////                System.out.println(person.name + %22 works with Greg.%22);%0A////            %7D%0A%0A
     

Remove code from run() method in Neo4jRepositoryApplication