Update MongoAutoConfiguration to be conditional on a missing
MongoDbFactory bean. The assumption is that if the user has declared
a MongoDbFactory they will either use it directly, or they will also
register a Mongo bean.
If the MongoDbFactory class cannot be found the existing Mongo
auto-configuration still applies. This ensures that users that do
not have Spring Data can still access a Mongo bean.
Fixes gh-1341
Enable if all of the following are true:
- spring-cloud is on the classpath
- There is no Cloud bean present
(usually done by extending AbstractCloudConfig)
- The "cloud" profile is active
Fixes gh-1302
Autoconfigure spring-cloud
if user also adds @EnableWebMvcSecurity. The problem is that the ordering
of the init() and configure() methods in the Spring Security configurers
can force things to happen too early unless we are careful. It's still a bit
twitchy I would say, but this relatively small change seems to fix the GS guide
and not break any existing tests.
I added a sample which mimic ths GS guide so we get an integration test that
executes the new code paths.
Fixes gh-1364
Update ConfigurationPropertiesBindingPostProcessor to use
`getBeansOfType` with `allowEagerInit=false` rather than `getBean`.
This prevents FactoryBeans from being instantiated early when their
type is not known.
Fixed gh-1365
Rename `VanillaHealthIndicator` to `ApplicationHealthIndicator` and
changed the exposed bean name from `statusHealthIndicator` to
`applicationHealthIndicator`.
This provides less confusing JSON output:
{"status":"UP","application":{"status":"UP"}}
vs:
{"status":"UP","status":{"status":"UP"}}
Fixes gh-1291
This commit adds two additional auto-configuration items that are new
in Spring 4.1
* A JmsMessagingTemplate is automatically created if none is present
* A default JmsListenerContainerFactory is automatically created if
@EnableJms has been triggered and no default has been set manually
Fixes gh-1298
JSON output of /health now has the same structure for 1 or more HealthIndicators. This makes it easier to consume the response from scripts or apps
fixes#1291
Move repository declarations out of the parent POM and into setting.xml
(except for the default profile). Also added jboss repository in an
attempt to fix the failing CI release.
Fixed gh-1349
The dependency is currently declared in Spring IO Platform from where
it can be removed once it's using a version of Boot that contains
this change. To make the migration of the dependency management from
the Platform to Boot seamless, the dependency is versioned using a
property with the same name as is currently used by the Platform:
javax-cache.version
Closes#1347
Previously, the data scripts were always run in response to the
publication of a DataSourceInitializedEvent, irrespective of
spring.datasource.initialize. While the event won't be published by
DataSourceInitializer if spring.datasource.initialize is false, it
will be published if spring.jpa.hibernate.hbm2ddl.auto has been set.
This commit updates DataSourceInitializer's handling of
DataSourceInitializedEvent to only run the data scripts if
spring.datasource.initialize is true.
Fixes#1336
The request is being made to '/' and, while the application does have
a mapping for '/', that mapping is not looked for before Spring
Security's filter rejects the request with a 401. This means that the
request is considered to be unmapped and this is reflected in the
metric's name.
See #1331 and #1333
Previously, when one or more custom locations were specified on
@ConfigurationProperties, the configuration loaded from those locations
was used in isolation from the default configuration provided by the
environment. Users have been surprised by this behaviour. For example,
it means that a placeholder used in the custom configuration will not
be resolved against the system properties.
This commit adds a new attribute, merge, to @ConfigurationProperties,
that defaults to true. When merge is true the default property sources
are appended to those that are loaded from the custom locations. When
set to false the custom configuration is used in isolation.
Closes#1301