Hibernate does not create Table in the database

前端 未结 2 1538
一生所求
一生所求 2021-01-27 20:04

I am using PostgreSQL and I am trying to run a simple Hibernate application, in particular the application decribed in the page. My hibernate.cfg.xml f

相关标签:
2条回答
  • 2021-01-27 20:46

    The question has been correctly answered. By the way, I'd like to add something. You put

    <property name="hibernate.connection.username">postgres</property>
            <property name="hibernate.connection.password">user</property>
    

    It's not a good option to change postgres password default (it carries security problems), and it isn't secure using postgres user as owner in a DB. For more information, see the following link https://serverfault.com/questions/110154/whats-the-default-superuser-username-password-for-postgres-after-a-new-install/325596#325596 Sorry for this disgression, but I think it could be useful.

    0 讨论(0)
  • 2021-01-27 20:49

    The property is hibernate.hbm2ddl.auto, instead of hibernate.hbm2dll.auto.

    DDL = Data Definition Language

    DLL = Dynamically Loaded Library

    0 讨论(0)
提交回复
热议问题