I have postgresql database, version 11. There I created database schema 'test'. Sql of that schema:
CREATE SCHEMA TEST
AUTHORIZATION "user-xxx";
ALTER DEFAULT PRIVILEGES IN SCHEMA test
GRANT ALL ON TABLES TO postgres;
ALTER DEFAULT PRIVILEGES IN SCHEMA test
GRANT ALL ON TABLES TO PUBLIC;
My config in spring boot:
datasource:
platform: postgres
jdbc-url: jdbc:postgresql://localhost:5432/BDA
username: user-xxx
password: user-xxx
jpa:
generate-ddl: true
properties:
hibernate:
default_schema: TEST
When launching the application I always get following exception:
Can not connect from spring boot to postgresql schema - 'org.postgresql.util.PLSQLException: ERROR: schema "test" does not exist'
If I don't specify the schema then it works with default database schema, and everything is ok.