What I am currently doing in my application.properties
file is:
spring.datasource.url=jdbc:postgresql://localhost:5432/myDB?currentSchema=mySchema
Isn't there another property for this? Since it looks hacky and according to a post (still finding the link sorry, will update later), it is only applicable to PostgreSQL 9.4.
Since this is quite old and has no proper answer yet, the right property to set is the following:
spring.jpa.properties.hibernate.default_schema=yourschema
You can try setting the default schema for the jdbc user.
1) ALTER USER user_name SET search_path to 'schema'
2) Did you try this property? spring.datasource.schema
http://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With