@@ -76,6 +76,9 @@ public class Documenter {
76
76
private static final String INVALID_FILE_NAME_PATTERN = "Configured file name pattern does not include a '%s' placeholder for the module name!" ;
77
77
private static final String DEFAULT_LOCATION = "spring-modulith-docs" ;
78
78
79
+ private static final String DEFAULT_COMPONENTS_FILE = "components.puml" ;
80
+ private static final String DEFAULT_MODULE_COMPONENTS_FILE = "module-%s.puml" ;
81
+
79
82
static {
80
83
DEPENDENCY_DESCRIPTIONS .put (DependencyType .EVENT_LISTENER , "listens to" );
81
84
DEPENDENCY_DESCRIPTIONS .put (DependencyType .DEFAULT , "depends on" );
@@ -203,7 +206,7 @@ public Documenter writeModulesAsPlantUml(DiagramOptions options) {
203
206
204
207
Assert .notNull (options , "Options must not be null!" );
205
208
206
- Path file = recreateFile (options .getTargetFileName ().orElse ("components.uml" ));
209
+ Path file = recreateFile (options .getTargetFileName ().orElse (DEFAULT_COMPONENTS_FILE ));
207
210
208
211
try (Writer writer = new FileWriter (file .toFile ())) {
209
212
writer .write (createPlantUml (options ));
@@ -264,7 +267,7 @@ public Documenter writeModuleAsPlantUml(ApplicationModule module, DiagramOptions
264
267
265
268
addComponentsToView (module , view , options );
266
269
267
- var fileNamePattern = options .getTargetFileName ().orElse ("module-%s.uml" );
270
+ var fileNamePattern = options .getTargetFileName ().orElse (DEFAULT_MODULE_COMPONENTS_FILE );
268
271
269
272
Assert .isTrue (fileNamePattern .contains ("%s" ), () -> String .format (INVALID_FILE_NAME_PATTERN , fileNamePattern ));
270
273
0 commit comments