public interface BroadleafSharedOverrideProfileAwarePropertySource
Holder for a folder of properties resources comprised of something like the following on the classpath:
Where the [profile] is a key that is resolved from the current Spring profile. Given that set of properties, they get ordered in the following way, where later files are applied after earlier ones and thus take precedence:
Note that this is largely created to support existing Broadleaf implementations for versions older than 5.2. Assuming that you are on Spring Boot, you should look to
application.properties variants from
the Spring Boot documentation
There is generally only a single one of these sources registered in the application, the
DefaultRuntimeEnvironmentProfileAwarePropertySource. If multiple of them
are registered, they are ordered based on
#getOrder() and all properties are added to the
Environment prior to moving to the next
BroadleafSharedOverrideProfileAwarePropertySource. To register your own version (again, not necessarily recommended) add this as an entry in a
Properties registered via this
BroadleafSharedOverrideProfileAwarePropertySource is functionally equivalent to registering them via
PropertySource and have the same ordering
"@PropertySource annotations on your @Configuration classes.
An important distinction is that these sources have a higher priority than any
PropertySource annotations on @Configuration classes.
These are guaranteed to take a higher precedence (and thus override) properties registered via
static final int DEFAULT_ORDER
common.propertiesfile. Note that this cannot be prefixed with
"classpath:"or any of those varieties since this drives the creation of an
ClassPathResourcealready based on this location.
Copyright © 2019. All rights reserved.