This commit makes sure that if a `javax.cache.CacheManager` is required,
an auto-configured `HazelcastInstance` is fully resolved first. This
prevents the case where the JCache bootstrap actually starts an instance
early, followed by a second (potentially unwanted) instance created by the
regular auto-configuration.
Since the JCache implementation works with an `HazelcastInstance` behind
the scenes, if there is one `HazelcastInstance` configured and it has a
name, then we configure the `CacheProvider` to use that. Future Hazelcast
version will allow to pass the instance directly (i.e. not requiring an
actual name).
Closes gh-8484
The changes made for gh-8299 attempted to make static resource
handling consistent across Jetty, Tomcat, and Undertow. They did so
for application's launched using JarLauncher or WarLauncher but did
not consider application's launched in an IDE or using spring-boot:run
in Maven or bootRun in Gradle.
Running in an IDE or via Maven or Gradle introduces two new
resource locations:
- Jars on the classpath with file protocol URLs (they are always
jar protocol URLs when using either launcher)
- Directories on the classpath from a project that is depended upon
and contains resources in META-INF/resources
This commit updates the factories for all three containers to handle
these new resources locations. The integration tests have also been
updated.
This commit flags the two `BeanPostProcessors` registered by the
embedded support as `synthetic` so that they don't trigger an early
initialization of other components.
Closes gh-8467
* gh-8268:
Polish "Enable customization of RestTemplate that retrieves JwtAccessTokenConverter's key"
Enable customization of RestTemplate that retrieves JwtAccessTokenConverter's key
Previously, the configuration class that produces the ErrorPageFilter
bean was an inner class of SpringBootServletInitializer. As a result,
whenever SpringBootServletInitializer was subclasses, the
ErrorPageFilter would be used. This adversely affected applications
running as an executable war file and those deployed to a container
with error page filter registration disabled.
This commit makes ErrorPageFilterConfiguration a top-level class so
that it is no longer always found via SpringBootServletInitializer.
The test that verifies that error page filter registration can be
disabled has been updated to more accurately simulate the behaviour
when an application is deployed as a war to a standalone container.
A test that mimics the behaviour of an application run as an
executable war has also been added.
Closes gh-8477
The additional configuration for an `HazelcastInstance` will be removed
in 2.0. This commit makes sure that the property is deprecated in 1.5
See gh-8470
Previously, each entry in loader.path could only refer to a standard
jar file. Refering to such a jar would add all of the classes in
the root of the jar to the class path.
This commit adds support for referencing a directory within a jar file
that contains one or more nested jars. For example:
$ java -jar -Dloader.path='jar:file:./lib.jar/!BOOT-INF/lib' my.jar
This will add all of the classes in all of that jars in the
BOOT-INF/lib directory of lib.jar to the class path.
See gh-8334
As of Hazelcast 3.7, the bootstrap is pretty slow by default due to the
networking discovery. This commit disables both TCP/IP and multicast
discoveries.
The main changes are:
- Switch to `loader.properties` instead of `application.properties`
- Search for `loader.properties` in `loader.home` as well as in
the classpath
- Placeholder replacements in MANIFEST.MF (using `loader.properties`
or system/env vars)
See gh-7221
Closes gh-8346
This commit makes sure that if `local.mongo.port` is set, a `MongoClient`
on the embedded MongoDB instance is created. When an embedded instance
is detected, only the `host` property is used and the `uri` is ignored if
set.
This makes sure that the auto-configured `MongoClient` automatically
switches to the embedded server, even if a production uri has been
specified.
Closes gh-8219