File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
extensions/webdav/src/main
resources/org/exist/webdav Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,21 @@ public ExistResourceFactory() {
71
71
72
72
// load specific options
73
73
try {
74
+ // 1) try and read default config from classpath
75
+ try (final InputStream is = getClass ().getResourceAsStream ("webdav.properties" )) {
76
+ if (is != null ) {
77
+ LOG .info ("Read default WebDAV configuration from classpath" );
78
+ webDavOptions .load (is );
79
+ } else {
80
+ LOG .warn ("Unable to read default WebDAV configuration from the classpath." );
81
+ }
82
+ }
83
+ } catch (final Throwable ex ) {
84
+ LOG .error (ex .getMessage ());
85
+ }
74
86
75
- // Find right file
87
+ try {
88
+ // 2) try and find overridden config relative to EXIST_HOME/etc
76
89
final Optional <Path > eXistHome = brokerPool .getConfiguration ().getExistHome ();
77
90
final Path config = FileUtils .resolve (eXistHome , "etc" ).resolve ("webdav.properties" );
78
91
@@ -82,12 +95,8 @@ public ExistResourceFactory() {
82
95
try (final InputStream is = Files .newInputStream (config )) {
83
96
webDavOptions .load (is );
84
97
}
85
-
86
- } else {
87
- LOG .info ("Using eXist-db default serialization options." );
88
98
}
89
-
90
- } catch (Throwable ex ) {
99
+ } catch (final Throwable ex ) {
91
100
LOG .error (ex .getMessage ());
92
101
}
93
102
File renamed without changes.
You can’t perform that action at this time.
0 commit comments