title: spring boot with hibernate throws table is not mapped Exception
body: <p>I'm learning Spring Boot,I want to query data by hibernate,</p>
  
  <p>the below is structure:
  <a href="http://i.stack.imgur.com/vxZXV.png" rel="nofollow">enter image description here</a></p>
  
  <p>and SpringExampleApplication class is:</p>
  
  <pre><code>@SpringBootApplication
  @ImportResource("classpath:application-db.xml")
  public class SpringExampleApplication {
  
  public static void main(String[] args) {
  
       ApplicationContext ctx =     SpringApplication.run(SpringExampleApplication.class, args);
  
       System.out.println("Let's inspect the beans provided by Spring Boot:");
  
       String[] beanNames = ctx.getBeanDefinitionNames();
       Arrays.sort(beanNames);
       for (String beanName : beanNames) {
           System.out.println(beanName);
       }
  }
  }
  </code></pre>
  
  <p>User class is:</p>
  
  <pre><code>@Entity
  @Table(name="tf_f_user")
  public class User {
  @Id
  @GeneratedValue(strategy=GenerationType.AUTO)
  private long id;
  @Column(name="name",length=1024)
  private String name;
  @Column(name="address")
  private String address;
  public long getId() {
      return id;
  }
  public void setId(long id) {
      this.id = id;
  }
  public String getName() {
      return name;
  }
  public void setName(String name) {
      this.name = name;
  }
  public String getAddress() {
      return address;
  }
  public void setAddress(String address) {
      this.address = address;
  }
  }   
  </code></pre>
  
  <p>then the expetion throws when I run the test case:</p>
  
  <pre><code> org.springframework.orm.hibernate4.HibernateQueryException: User is not mapped [from User where id= ? ]; nested exception is org.hibernate.hql.internal.ast.QuerySyntaxException: User is not mapped [from User where id= ? ]
  </code></pre>
  
  <p>thanks for help.</p>