代码之家  ›  专栏  ›  技术社区  ›  tenticon

spring boot-应用程序在oracle出错的情况下启动

  •  0
  • tenticon  · 技术社区  · 7 年前

    spring.datasource.platform=uat
    spring.jpa.database=Oracle
    spring.jpa.hibernate.ddl-auto=update
    spring.datasource.initialization-mode=always
    spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
    spring.jpa.show-sql=true
    spring.datasource.url=url
    spring.datasource.username=username
    spring.datasource.password=password
    spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
    spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
    

    @Entity 被扫描并创建了一个模式我得到了一个oracle错误( ORA-00904: : invalid identifier )尽管有设置,应用程序仍会继续启动 spring.datasource.continue-on-error=false

    编辑

    我不能张贴的实体,但它的形式

    @Entity
    @Table(name="foo")
    public class Foo {
          @Id 
          @GenericGenerator(name="idGen", strategy="increment")
          @GeneratedValue(generator="idGen")
          @Column(name="id",nullable=false)
          private Long id;
    
          @Column(name="userid",nullable=false)
          private String user;
    
          /*getter and setter lombok annotations omitted for readability*/
     }
    

    谢谢你的帮助

    0 回复  |  直到 7 年前