Subversion Repositories SmartDukaan

Rev

Rev 34711 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34711 Rev 35385
Line 84... Line 84...
84
			LOGGER.error("Error in reading env property file.Adding default property" + e);
84
			LOGGER.error("Error in reading env property file.Adding default property" + e);
85
			properties.put("profile", "dev");
85
			properties.put("profile", "dev");
86
		}
86
		}
87
		activeProfile = (String) properties.get("profile");
87
		activeProfile = (String) properties.get("profile");
88
 
88
 
-
 
89
		Resource appResource;
-
 
90
		Resource sharedResource;
-
 
91
 
89
		if ("prod".equals(activeProfile)) {
92
		if ("prod".equals(activeProfile)) {
90
			resource = new ClassPathResource("/META-INF/prod.properties");
93
			appResource = new ClassPathResource("/META-INF/prod.properties");
-
 
94
			sharedResource = new ClassPathResource("/shared-prod.properties");
91
		} else if ("staging".equals(activeProfile)) {
95
		} else if ("staging".equals(activeProfile)) {
92
			resource = new ClassPathResource("/META-INF/staging.properties");
96
			appResource = new ClassPathResource("/META-INF/staging.properties");
-
 
97
			sharedResource = new ClassPathResource("/shared-staging.properties");
93
		} else {
98
		} else {
94
			resource = new ClassPathResource("/META-INF/dev.properties");
99
			appResource = new ClassPathResource("/META-INF/dev.properties");
-
 
100
			sharedResource = new ClassPathResource("/shared-dev.properties");
95
		}
101
		}
96
 
102
 
-
 
103
		resource = appResource;
-
 
104
 
-
 
105
		// Load shared properties from dao first, then app-specific (app-specific can override)
97
		propertySourcesPlaceholderConfigurer.setLocation(resource);
106
		propertySourcesPlaceholderConfigurer.setLocations(sharedResource, appResource);
-
 
107
		propertySourcesPlaceholderConfigurer.setIgnoreResourceNotFound(true);
98
 
108
 
99
		return propertySourcesPlaceholderConfigurer;
109
		return propertySourcesPlaceholderConfigurer;
100
	}
110
	}
101
 
111
 
102
	@Bean
112
	@Bean