Specifying embedded postgres data directories

I found this in the docs:

If spring.datasources.dataservices.embedded-postgres.path is not provided, temp folder will be used to persist data.

I tried to specify an absolute path using an environment variable, like so in my IntelliJ run config:

    <envs>
      <env name="SPRING_DATASOURCES_DATASERVICES_EMBEDDED-POSTGRES_PATH" value="$PROJECT_DIR$/pg-data" />
    </envs>

This fails with some strange error /C:/dev/.../pg-data] cannot be resolved to absolute file path.
Took me a while to figure out that ds tries to load it using Spring’s ResourceLoader and for the correct syntax I need to add a “file://” prefix:

      <env name="SPRING_DATASOURCES_DATASERVICES_EMBEDDED-POSTGRES_PATH" value="file://$PROJECT_DIR$/pg-data" />

That should really be documented.

Also, there’s a slight doc bug in the contentstore docs, because it also mentions, spring.datasources.dataservices.embedded-postgres.path but then later correctly uses spring.datasources.**contentstore**.embedded-postgres.path

Thanks @stephen-warm-graph, I will create ticket to update documentation for these points.