Subversion Repositories SmartDukaan

Rev

Rev 35775 | Rev 35838 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35775 Rev 35832
Line 59... Line 59...
59
    private static final String VELOCITY_PATH_PREFIX = "/WEB-INF/views/ftl/";
59
    private static final String VELOCITY_PATH_PREFIX = "/WEB-INF/views/ftl/";
60
    private static final String VELOCITY_PATH_SUFFIX = ".vm";
60
    private static final String VELOCITY_PATH_SUFFIX = ".vm";
61
    private static final String MESSAGE_PATH_SOURCE_NAME = "classpath:messages";
61
    private static final String MESSAGE_PATH_SOURCE_NAME = "classpath:messages";
62
    private static final Logger LOGGER = LogManager.getLogger(AppConfig.class);
62
    private static final Logger LOGGER = LogManager.getLogger(AppConfig.class);
63
    private static Resource resource;
63
    private static Resource resource;
-
 
64
    private static Resource sharedResource;
64
 
65
 
65
    public static Resource getResource() {
66
    public static Resource getResource() {
66
        return resource;
67
        return resource;
67
    }
68
    }
68
 
69
 
-
 
70
    public static Resource getSharedResource() {
-
 
71
        return sharedResource;
-
 
72
    }
-
 
73
 
69
    public void setResource(Resource resource) {
74
    public void setResource(Resource resource) {
70
        AppConfig.resource = resource;
75
        AppConfig.resource = resource;
71
    }
76
    }
72
 
77
 
73
    @Bean(value = "velocityAttributesMap")
78
    @Bean(value = "velocityAttributesMap")
Line 174... Line 179...
174
            appResource = new ClassPathResource("/META-INF/dev.properties");
179
            appResource = new ClassPathResource("/META-INF/dev.properties");
175
            sharedResource = new ClassPathResource("/shared-dev.properties");
180
            sharedResource = new ClassPathResource("/shared-dev.properties");
176
        }
181
        }
177
 
182
 
178
        resource = appResource;
183
        resource = appResource;
-
 
184
        AppConfig.sharedResource = sharedResource;
179
 
185
 
180
        // Load shared properties from dao first, then app-specific (app-specific can override)
186
        // Load shared properties from dao first, then app-specific (app-specific can override)
181
        propertySourcesPlaceholderConfigurer.setLocations(sharedResource, appResource);
187
        propertySourcesPlaceholderConfigurer.setLocations(sharedResource, appResource);
182
        propertySourcesPlaceholderConfigurer.setIgnoreResourceNotFound(true);
188
        propertySourcesPlaceholderConfigurer.setIgnoreResourceNotFound(true);
183
 
189