I have created an specific schema(example myschema) in aws postgre service and I am trying to connect with my spring boot application. But It is not working. I am successfully able to connect to public schema for aws postgre, but not able to connect with new schema created. I have tried using below two method:
spring.datasource.hikari.schema=myschema AND spring.jpa.properties.hibernate.default_schema=myschema
since I am using spring.jpa.hibernate.ddl-auto=validate, property, while starting spring application it is getting failed and showing error like "org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing table" but the table and required objects created.
Kindly suggest me related to this issue.
You have two options:
using of default_schema in application properties
spring.jpa.properties.hibernate.default_schema: my_custom_schema
explicitly specifying schema for each entity
@Entity
@Table(name = "my_table", schema = "my_custom_schema")
You don't need to patch jdbc url in any way. I use hikari but I've never specified spring.datasource.hikari.schema. It looks redundant
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.