title: Cannot prevent Spring Data JPA from re-creating table on each running of app
body: <p>I just started to Spring Boot and managed to create table in PostgreSQL database. Then I add a config file to my project that would insert data to database. However, as far as I see, the code does not hit this config file and re-create table. I tried to change <code>spring.jpa.hibernate.ddl-auto</code> parameter in <code>application.properties</code> file, but it does not make any sense and as a result, the table is re-created on each app running with empty record (it is also seen on Java console just create table). SO, what I am missing?</p>
  <p><em><strong>application.properties:</strong></em></p>
  <pre><code>spring.datasource.url=jdbc:postgresql://localhost:5432/student
  spring.datasource.username=postgres
  spring.datasource.password=******
  spring.jpa.hibernate.ddl-auto=create-drop
  spring.jpa.show-sql=true
  spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
  spring.jpa.properties.hibernate.format_sql=true
  </code></pre>
  <p><em><strong>StudentConfig:</strong></em></p>
  <pre><code>@Configuration
  public class StudentConfig {
  
      CommandLineRunner commandLineRunner(StudentRepository repository) {
          return args -&gt; {
              Student johnson = new Student(
                      &quot;johnson@gmail.com&quot;,
                      &quot;Johnson&quot;,
                      LocalDate.of(2000, JANUARY, 5)
              );
  
              Student alex = new Student(
                      &quot;alex@gmail.com&quot;,
                      &quot;alex&quot;,
                      LocalDate.of(2010, JANUARY, 17)
              );
  
              repository.saveAll(List.of(johnson, alex));
          };
      }
  }
  </code></pre>