/** * Loads the Encrypted configuration BotMill configuration properties file. * In order for this to work, you need a botmill.properties file on the * classpath. If you have a Maven project, just make sure to place it in the * resources folder. * * @param encryptor * the encryptor */ public static void setEncryptedPropertiesEncryptor(PBEStringCleanablePasswordEncryptor encryptor) { try { if (encryptedConfiguration == null) { encryptedConfiguration = new EncryptableProperties(encryptor); } encryptedConfiguration.load(ConfigurationUtils.class.getClassLoader().getResourceAsStream(CONFIG_PATH)); } catch (Exception e) { logger.error("Error while loading BotMill properties file ({})", CONFIG_PATH, e); } }
/** * Loads the Encrypted configuration BotMill configuration properties file. * In order for this to work, you need a botmill.properties file on the * classpath. If you have a Maven project, just make sure to place it in the * resources folder. * * @param encryptor * the encryptor. * @param classpathProperties * the classpath properties */ public static void loadEncryptedConfigurationFile(PBEStringCleanablePasswordEncryptor encryptor, String classpathProperties) { try { if (encryptedConfiguration == null) { encryptedConfiguration = new EncryptableProperties(encryptor); } encryptedConfiguration .load(ConfigurationUtils.class.getClassLoader().getResourceAsStream(classpathProperties)); } catch (Exception e) { logger.error("Error while loading BotMill properties file ({})", CONFIG_PATH, e); } }