package ru.cjdb.config;

import javax.inject.Inject;
import javax.inject.Singleton;
import java.io.*;
import java.util.Properties;


/**
 * Хранилище конфигурации
 *
 * @author Sergey Tselovalnikov
 * @since 28.09.14
 */
@Singleton
public class ConfigStorage {
    private final Properties properties = new Properties();

    @Inject
    public ConfigStorage() {
        InputStream configFile = this.getClass().getResourceAsStream("db.properties");
        try {
            properties.load(configFile);
        } catch (IOException e) {
            throw new RuntimeException("Please provide db.properties file");
        }
    }

    public String getRootPath() {
        return properties.getProperty(Props.PATH);
    }

    public String getProperty(String key) {
        return properties.getProperty(key);
    }
}

@@ -393,59 +393,22 @@
 e = 
-this.getClass().getResourceAsStream(%22db.properties%22
+getConfigFile(
 );%0A 
@@ -572,16 +572,16 @@
 file%22);%0A
-
         
@@ -581,32 +581,389 @@
        %7D%0A    %7D%0A%0A
+    /**%0A     * %D0%94%D0%B2%D0%BE%D0%B9%D0%BD%D0%B0%D1%8F %D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0 %D0%B8%D0%B7-%D0%B7%D0%B0 %D0%BF%D1%80%D0%BE%D0%B1%D0%BB%D0%B5%D0%BC %D1%81 %D1%82%D0%B5%D1%81%D1%82%D0%B0%D0%BC%D0%B8 %D0%B2 CI%0A     */%0A    private InputStream getConfigFile() %7B%0A        InputStream configFile = this.getClass().getResourceAsStream(%22db.properties%22);%0A        if (configFile == null) %7B%0A            configFile = ClassLoader.getSystemResourceAsStream(%22db.properties%22);%0A        %7D%0A        return configFile;%0A    %7D%0A%0A
     public Strin

Fix resource path