hibernate 项目启动时总会自动创建表

hibernate 项目启动时总会自动创建表,造成以下错误

Caused by: java.sql.SQLSyntaxErrorException: ORA-00955: 名称已由现有对象使用

  经验证,是方言使用错误导致的。项目使用的数据库版本为Oracle11g,方言应该使用  org.hibernate.dialect.Oracle10gDialect

修改配置如下:

  jpa:
    show-sql: true
    database-platform: org.hibernate.dialect.Oracle10gDialect
    properties:
      hibernate:
        hbm2ddl:
          auto: update

  

猜你喜欢

转载自www.cnblogs.com/Leechg/p/12199685.html