/** * Creates a new instance of {@code AbstractYAMLBasedConfiguration}. */ protected AbstractYAMLBasedConfiguration() { initLogger(new ConfigurationLogger(getClass())); }
/** * Creates a new instance of {@code XMLConfiguration}. */ public XMLConfiguration() { super(); initLogger(new ConfigurationLogger(XMLConfiguration.class)); }
/** * Creates a new instance of {@code AbstractYAMLBasedConfiguration} as a * copy of the specified configuration. * * @param c the configuration to be copied */ protected AbstractYAMLBasedConfiguration( final HierarchicalConfiguration<ImmutableNode> c) { super(c); initLogger(new ConfigurationLogger(getClass())); }
/** * Creates a new instance of {@code DynamicCombinedConfiguration} that uses * a union combiner. * * @see org.apache.commons.configuration2.tree.UnionCombiner */ public DynamicCombinedConfiguration() { super(); initLogger(new ConfigurationLogger(DynamicCombinedConfiguration.class)); localSubst = initLocalInterpolator(); }
/** * Creates a new dummy logger which produces no output. If such a logger is * passed to a configuration object, logging is effectively disabled. * * @return the new dummy logger */ public static ConfigurationLogger newDummyLogger() { return new ConfigurationLogger(new NoOpLog()); }
/** * Creates a new instance of {@code DatabaseConfiguration}. */ public DatabaseConfiguration() { initLogger(new ConfigurationLogger(DatabaseConfiguration.class)); addErrorLogListener(); }
/** * Creates a JNDIConfiguration using the specified initial context shifted * by the specified prefix as the root of the properties. * * @param context the initial context * @param prefix the prefix */ public JNDIConfiguration(final Context context, final String prefix) { this.context = context; this.prefix = prefix; initLogger(new ConfigurationLogger(JNDIConfiguration.class)); addErrorLogListener(); }
/** * Creates a new instance of {@code XMLConfiguration} and copies the * content of the passed in configuration into this object. Note that only * the data of the passed in configuration will be copied. If, for instance, * the other configuration is a {@code XMLConfiguration}, too, * things like comments or processing instructions will be lost. * * @param c the configuration to copy * @since 1.4 */ public XMLConfiguration(final HierarchicalConfiguration<ImmutableNode> c) { super(c); rootElementName = (c != null) ? c.getRootElementName() : null; initLogger(new ConfigurationLogger(XMLConfiguration.class)); }
/** * Creates a new instance of {@code DynamicCombinedConfiguration} and * initializes the combiner to be used. * * @param comb the node combiner (can be <b>null</b>, then a union combiner * is used as default) */ public DynamicCombinedConfiguration(final NodeCombiner comb) { super(); setNodeCombiner(comb); initLogger(new ConfigurationLogger(DynamicCombinedConfiguration.class)); localSubst = initLocalInterpolator(); }
/** * Initializes a newly created child configuration. This method copies a * bunch of settings from this instance to the child configuration. * * @param config the child configuration to be initialized */ private void initChildConfiguration(final CombinedConfiguration config) { if (loggerName != null) { config.setLogger(new ConfigurationLogger(loggerName)); } config.setExpressionEngine(this.getExpressionEngine()); config.setConversionExpressionEngine(getConversionExpressionEngine()); config.setListDelimiterHandler(getListDelimiterHandler()); copyEventListeners(config); for (final ConfigData data : configurations) { config.addConfiguration(data.getConfiguration(), data.getName(), data.getAt()); } config.setSynchronizer(getSynchronizer()); }
/** * Creates a new instance of {@code FixedAbstractYAMLBasedConfiguration}. */ protected FixedAbstractYAMLBasedConfiguration() { initLogger(new ConfigurationLogger(getClass())); }
/** * Creates a new instance of {@code FixedAbstractYAMLBasedConfiguration}. */ protected FixedAbstractYAMLBasedConfiguration() { initLogger(new ConfigurationLogger(getClass())); }
/** * Creates a new instance of {@code FixedAbstractYAMLBasedConfiguration} as a * copy of the specified configuration. * * @param c the configuration to be copied */ protected FixedAbstractYAMLBasedConfiguration( HierarchicalConfiguration<ImmutableNode> c) { super(c); initLogger(new ConfigurationLogger(getClass())); }
/** * Creates a new instance of {@code FixedAbstractYAMLBasedConfiguration} as a * copy of the specified configuration. * * @param c the configuration to be copied */ protected FixedAbstractYAMLBasedConfiguration( HierarchicalConfiguration<ImmutableNode> c) { super(c); initLogger(new ConfigurationLogger(getClass())); }
@SpringBootApplication public class Application{ public static void main(String[] args) { SpringApplication app = new SpringApplication(Application.class); app.setShowBanner(false); // add configuration properties logger app.addListeners(new ConfigurationLogger()); app.run(args); } }
public static void main(String[] args) { SpringApplication app; if( ArrayUtils.contains(args, "--createdb")){ app = new SpringApplication(CreateDB.class); args = (String[])ArrayUtils.add(args, "--spring.jpa.hibernate.ddl-auto=create"); } else { app = new SpringApplication(Application.class); } app.setWebEnvironment(false); app.setShowBanner(false); app.addListeners(new ConfigurationLogger()); // launch the app ConfigurableApplicationContext context = app.run(args); // finished so close the context context.close(); }