【发布时间】:2019-12-03 12:57:23
【问题描述】:
我有一个Spring Boot api,它连接到postgresql中的数据库,在数据库中我有两个方案,一个是我自己的,一个是公共的。 插入我在我的方案中的表时,是在公共中创建并插入那里的。 我试图在实体中输入我的方案名称,但它给了我一个错误并说它不存在,我不知道是否有必要这样做:
@Entity
@Table( name = "rules" , schema = "eschema1")
这是我的 application.properties:
spring.datasource.url=jdbc:postgresql://15.98.0.65:5432/database
spring.datasource.username=postgres
spring.datasource.password=
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=none
【问题讨论】:
-
我希望您并没有真正为您的 Web 应用程序使用
postgres用户? -
是的,我们正在使用它,为什么?
-
已经,对于某些测试来说不是最终的,现在我需要它来工作
标签: postgresql hibernate spring-boot application.properties