| I can read in doc: If the file <tt>myDirectory/myFile.properties</tt> exists then the property values will be loaded from it, otherwise the defaults declared on the property configurer will be used. By default when the resource is not found it will be copied out into the data directory. However {@link #setCopyOutTemplate(boolean)} can be used to control this. However, if the configuration file does not exist, it will be created but empty. This can be seen on the example of the geofence module. I compiled geoserver v.2.15.1 with geofence and goefence-server profiles and ran on an empty geoserver_data directory. The geofence directory has been created, including the geofence-db directory and files: geofence-datasource-ovr.properties, geofence-server.properties. However, these files are empty. I see that the code that populates the file with the default values is located in the catch block in the loadProperties method: https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/config/GeoServerPropertyConfigurer.java#L101 However, during debugging, I've observed that FileNotFoundException is never thrown by the loadProperties of the PropertiesLoaderSupport Spring class. After exiting this method, the file is already created (empty). |