Optimize `AutoConfigurationSorter` by used properties generated by the
annotation processor whenever possible. The removes the need for each
candidate class to be ASM parsed just to access the order annotations.
See gh-7573
Add AutoConfigurationMetadata interface and a an internal loader that
allows easy access to data written by `spring-boot-configure-processor`.
See gh-7573
Add an annotation processor that generates properties files for certain
auto-configuration class annotations. Currently attribute values from
@AutoConfigureOrder, @AutoConfigureBefore, @AutoConfigureAfter and
@ConditionalOnClass annotations are stored.
The properties file will allow optimizations to be added in the
`spring-boot-autoconfigure` project. Primarily by removing the need
to ASM parse as many `.class` files.
See gh-7573
Update `AutoConfigurationImportSelector` so that exclude properties
are loaded without invoking a `DataBinder`. This optimization helps
to improve application startup time.
See gh-7573
Update `JacksonJsonParser` to that the `ObjectMapper` is only
initialized on first use. This performance optimization helps with
startup times if nothing uses the parser.
Fixes gh-8074
Update `OnBeanCondition` to no longer call `ReflectionUtils` when
deducing the bean method return type. Since Spring Framework 4.2
the return type has been directly available from `MethodMetadata`.
See gh-7573
Update `OnClassCondition` to use its own `isPresent` rather than using
`ClassUtils.isPresent`. Using our own implementation saves a few cycles
since we never need to check for native types, and we don't support
nested class references specified in the non `$` notation.
See gh-7573
Remove the slightly unusual dependency from the root autoconfigure
pacakge to `condition`. Prior to this commit the link was required in
ordere to populate the `ConditionEvaluationReport`. We now introduce
a `AutoConfigurationImportListener` strategy that allows anyone to
listen for AutoConfigurationImportEvents. The listener implementation
is now used to update the ConditionEvaluationReport.
Fixes gh-8073
Rename EnableAutoConfigurationImportSelector to the more general
AutoConfigurationImportSelector since it's now used for more than
just the enable annotation.
The existing EnableAutoConfigurationImportSelector class remains in
a deprecated form so that it can be made package-private again in
Spring Boot 2.0.
Fixes gh-8072
This commit deprecates the `exceptionIfInvalid` feature as we have now a
way to select the `@ConfigurationProperties` object to validate (i.e. add
`@Validated` on them).
Closes gh-8027
Previously, spring.profiles.include was only considered when it was
used in a configuration file. It was ignored in any other property
source.
This commit updates ConfigFileApplicationListener so that
spring.profiles.include can be used in any property source to add to
the profiles that have been declared active via
spring.profiles.active.
Closes gh-7668
Previously, AspectJ would find META-INF/aop.xml almost as soon as
the jar was launched, and before LaunchedURLClassLoader had been
created. This meant that AspectJ would attempt to load aspects listed
in META-INF/aop.xml but that were package in BOOT-INF/classes and,
therefore, could not be loaded.
This commit updates the Repackager so that a META-INF/aop.xml file
is moved into BOOT-INF/classes. This ensures that it isn't visible
to the app class loader so it won't be loaded to early. It will
now be loaded by LaunchedURLClassLoader which can also load the
compiled aspects that aop.xml references.
Closes gh-7587
This commits adds a slice test infrastructure for MongoDB, similar to
what `@DataJpaTest` does with JPA.
By default, an embedded Mongod process is used if available.
See gh-7600
This commit improves the logic of the embedded Mongo support to use a
random port if no custom port has been specified. This doesn't change
the default if the embedded support isn't active.
Closes gh-8044
Previously, the actuator's endpoints produced application/json and,
where appropriate, also consumed application/json. Without a custom,
versioned media type, it's impossible for us to make changes to the
endpoints without breaking clients.
This commit introduces a new media type,
application/spring-boot.actuator.v1+json, that is now produced by
default with application/json also being produced if requested.
Endpoints that consume JSON will now also accept content the uses
the new media type in addition to application/json.
Closes gh-7967