报错:Caused by: org.hibernate.tool.schema.extract.spi.SchemaExtractionException: More than one table found in namespace (, ) : data_source

可能原因:在其他catalog schmea 下存在同名表或表名符合格式data_source(如data1source)。

若是在其他catalog schmea 下存在同名表,可配置默认catalog 和schema。

hibernate 中配置参数default_catalog、default_schema,根据数据库是否支持catalog、schema 进行配置。

spring data jpa 中配置方式是在配置文件(application.properties)中配置参数schema,如

spring.jpa.properties.hibernate.default_catalog=yourCatalog

spring.jpa.properties.hibernate.default_schema=yourSchema

若表名符合格式data_source,那就需要自己建表然后取消自动更新ddl。即可能需要寻求其他方式解决。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2021-12-03
  • 2021-09-06
  • 2022-12-23
  • 2021-07-26
猜你喜欢
  • 2022-12-23
  • 2021-06-15
  • 2021-04-04
  • 2021-09-10
  • 2022-12-23
  • 2021-06-06
相关资源
相似解决方案