title: Can Hibernate generate tables without Spring?
body: <p>I have Hibernate on my project,</p>
  
  <p>but no Spring yet.</p>
  
  <p>I wonder if:</p>
  
  <p>Question 1:</p>
  
  <p>Hibernate annotations and dialect propert in persistence.xml is enough for Hibernate to generate tables?</p>
  
  <p>Question 2:
  Also i guess, there must be something like Spring to look for annotations and fire a generation event and start some other things?</p>
  
  <p>EDIT:</p>
  
  <p>My persistence.xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"&gt;
      &lt;persistence-unit name="Kutuphane2" transaction-type="RESOURCE_LOCAL"&gt;
          &lt;non-jta-data-source&gt;kutuphaneDS&lt;/non-jta-data-source&gt;
          &lt;properties&gt;
              &lt;property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/kutuphane"/&gt;
              &lt;property name="javax.persistence.jdbc.user" value="root"/&gt;
              &lt;property name="javax.persistence.jdbc.password" value="root"/&gt;
              &lt;property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/&gt;
              &lt;property name="hibernate.show_sql" value="true"/&gt;
              &lt;property name="hibernate.format_sql" value="true"/&gt;
              &lt;property name="hibernate.hbm2ddl.auto" value="create"/&gt;
              &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>