This commit also makes sure to generate unique embedded data source and
disable datasource initialization as this is not required by those
tests.
See gh-9889
This commit adds an additional class check to AopAutoConfiguration as
it is main role is to configure `@EnableAspectJAutoProxy` which won't
work properly if `aspectjweaver` is not present.
Closes gh-9880
Previously, background preinitialization was started in response to
an ApplicationEnvironmentPreparedEvent and would complete at an
undetermined time later. This opened a window where SpringApplication
run could return and background preinitialization could still be
in progress. If, within this window, something attempted to configure
the logging system, an IO failure could occur as logging on the
background preinitialization thread would attempt to use resources
that had been closed.
This commit updates BackgroundPreinitializer so that it waits for
preinitialization to have completed when it receives an application
ready or application failed event. This prevents SpringApplication
run from returning while preinitialization is still in progress,
closing the window described above.
With info level logging enabled it appears that background
preinitialization consistently completes before the application ready
event is published. As a result, waiting should have no adverse effect
on performance in normal circumstances. With logging configured such
that background preinitialization outputs a large volume of log
messages (enabling trace logging for the root logger, for example), it
will be slowed down sufficiently for waiting to be necessary.
Closes gh-5669
Background preinitialization triggers static initialization of a
number of components that are slow to initialize. As the
initialization is static, it's only necessary once per class loader.
Previously, a new background preinitialization thread would be
created and started for each ApplicationEnvironmentPreparedEvent.
This commit updates the preinitializer to only create and start the
thread if preinitialization has not already been started for the
current class loader.
Closes gh-9869
Rename `ApplicationContextTester` and related classes to
`ApplicationContextRunner` and refactor existing tests to use correctly
named variables.
See gh-9875
This commit resets the artificial use of the http driver now the bolt
driver doesn't check if the connection to the Neo4J server is valid
on startup.
See neo4j/neo4j-java-driver#380
Closes gh-9500
Update `@ImportAutoConfiguration` so that it is no longer annotated with
`@AutoConfigurationPackage` and as such isn't a marker for
`AutoConfigurationPackages`.
Having `@ImportAutoConfiguration` marked as an auto-configuration
package is particularly problematic in tests since it frequently breaks
context caching.
Fixes gh-9282
This commit expands the support of PooledConnectionFactory so that
binding the third party object is no longer necessary. All 3rd party
properties are now deprecated in favour of our explicit support.
The main reason behind this change is that a `connection-factory` and
`properties` property were exposed. The former is used to set the
`ConnectionFactory` and makes no sense as a key. The latter is
rebuilding the underlying `ActiveMQConnectionFactory` at each call
without reusing any existing settings.
Closes gh-9837
Previously, if a user's configuration class provided a custom
Validator bean, that configuration class would be initialized very
early so that the Validator could be used to create the
auto-configured MethodValidationPostProcessor. This early
initialization could problems as it may prevent any of the
configuration class's dependencies from being post-processed.
This commit updates the injection of the Validator bean to be lazy,
thereby preventing the creation of the auto-configured
MethodValidationPostProcessor from triggering early initialization.
Closes gh-9416