mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-11 02:10:11 +01:00
Fix: YamlFile - String length limit disable (#1716)
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
This commit is contained in:
parent
81e2a77e57
commit
e1d0f2cd3e
@ -14,6 +14,8 @@ import java.util.List;
|
||||
|
||||
import org.simpleyaml.configuration.comments.CommentType;
|
||||
import org.simpleyaml.configuration.file.YamlFile;
|
||||
import org.simpleyaml.configuration.implementation.SimpleYamlImplementation;
|
||||
import org.simpleyaml.configuration.implementation.snakeyaml.lib.DumperOptions;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.ApplicationContextInitializer;
|
||||
@ -71,9 +73,17 @@ public class ConfigInitializer
|
||||
}
|
||||
|
||||
final YamlFile settingsTemplateFile = new YamlFile(tempTemplatePath.toFile());
|
||||
DumperOptions yamlOptionsSettingsTemplateFile =
|
||||
((SimpleYamlImplementation) settingsTemplateFile.getImplementation())
|
||||
.getDumperOptions();
|
||||
yamlOptionsSettingsTemplateFile.setSplitLines(false);
|
||||
settingsTemplateFile.loadWithComments();
|
||||
|
||||
final YamlFile settingsFile = new YamlFile(settingsPath.toFile());
|
||||
DumperOptions yamlOptionsSettingsFile =
|
||||
((SimpleYamlImplementation) settingsFile.getImplementation())
|
||||
.getDumperOptions();
|
||||
yamlOptionsSettingsFile.setSplitLines(false);
|
||||
settingsFile.loadWithComments();
|
||||
|
||||
// Load headers and comments
|
||||
@ -81,6 +91,10 @@ public class ConfigInitializer
|
||||
|
||||
// Create a new file for temporary settings
|
||||
final YamlFile tempSettingFile = new YamlFile(settingsPath.toFile());
|
||||
DumperOptions yamlOptionsTempSettingFile =
|
||||
((SimpleYamlImplementation) tempSettingFile.getImplementation())
|
||||
.getDumperOptions();
|
||||
yamlOptionsTempSettingFile.setSplitLines(false);
|
||||
tempSettingFile.createNewFile(true);
|
||||
tempSettingFile.setHeader(header);
|
||||
|
||||
|
@ -6,6 +6,8 @@ import java.nio.file.Paths;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.simpleyaml.configuration.file.YamlFile;
|
||||
import org.simpleyaml.configuration.implementation.SimpleYamlImplementation;
|
||||
import org.simpleyaml.configuration.implementation.snakeyaml.lib.DumperOptions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ -92,6 +94,9 @@ public class InitialSecuritySetup {
|
||||
Path path = Paths.get("configs", "settings.yml"); // Target the configs/settings.yml
|
||||
|
||||
final YamlFile settingsYml = new YamlFile(path.toFile());
|
||||
DumperOptions yamlOptionssettingsYml =
|
||||
((SimpleYamlImplementation) settingsYml.getImplementation()).getDumperOptions();
|
||||
yamlOptionssettingsYml.setSplitLines(false);
|
||||
|
||||
settingsYml.loadWithComments();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user