Closed tmons closed 1 year ago
This is a good idea! However, I think we will move this code to the core library (that is, plantuml.jar) so that every tool can take advantage of this. In the mean time, we have merged your contribution. Thanks again!
Solves #169.
This pull requests introduces a
PLANTUML_CONFIG_FILE
environment variable that allows one to specify a path to a local PlantUML configuration file that should be applied to all diagrams. This allows server administrators to change the default theme, set default styling options, etc. It uses the same functionality exposed by the-config
flag of the PlantUML CLI.Implementation details:
PLANTUML_CONFIG_FILE
env variable is set, the configuration is read once and stored in static variable.PLANTUML_CONFIG_FILE
env variable is set and the generated diagram throws an exception, the diagram is regenerated without the configuration file before being returned. This is mainly done to prevent end users from seeing exceptions caused by the configuration file.