public static PropertySourcesPlaceholderConfigurer properties()

in src/main/java/com/epam/gmp/config/GMPConfig.java [75:94]


    public static PropertySourcesPlaceholderConfigurer properties() {
        PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
        Resource[] resources;
        try {
            Resource homeResource = gmpHomeURL().createRelative(GMP_PROPERTIES);
            if (homeResource.exists()) {
                resources = new Resource[]{homeResource};
            } else {
                resources = new ClassPathResource[]{new ClassPathResource("gmp-home/" + GMP_PROPERTIES)};
            }


        } catch (IOException e) {
            throw new ScriptContextException("Unable to initialize " + GMP_PROPERTIES, e);
        }
        pspc.setLocations(resources);
        pspc.setIgnoreUnresolvablePlaceholders(true);
        pspc.setIgnoreResourceNotFound(true);
        return pspc;
    }