在启动我的spring boot应用程序时(使用hibernate jpa),将创建到oracle数据库的连接
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
,该应用仍继续启动
如果遇到sql错误,我该怎么办?
编辑
我无法发布该实体,但其格式为
@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*/
}
感谢您的帮助