Add `mainClass` property option to the Repackage task. If the property
is defined within a task, it works in the same way as if it defined
within the springBoot{} 'ext' properties section.
Option is valid only for that specific task where it is defined, and
will override option defined in springBoot{} ext properties.
Fixes gh-283
Add a setRegisterShutdownHook option to SpringApplication allowing the
shutdown hook to not be registered.
Also update SpringApplicationBuilder to automatically disable shutdown
hooks for child contexts.
Fixes gh-314
Disable Mongo auto-configuation when @EnableMongoRepositories is used
and adapt the test helper classes accordingly.
Change the property prefix and dependency management version property
from `...mongo` to `...mongodb` for consistency with Spring Data.
Fixes gh-315
Update javadoc and method names to indicate that ApplicationInitializer
and ApplicationListeners are `Order` sorted before being invoked.
Also remove specific sorting from SpringApplicationBuilder, relying
instead on the Order sorting.
Fixes gh-316
Restore the previous `spring.profiles.active` logic effectively
reverting commit 37069d9. This ensures that active profiles defined in
a higher `PropertySource` replace those lower down.
In addition, add support for a `+` prefix that can be used to indicate
that a profile should be added to the active set.
For example:
# application-prod.properties
spring.profiles.active=+proddb,+prodmq
Fixed gh-308, gh-309
Update `EndpointWebMvcAutoConfiguration` to use '-1' to indicate that
the management context should be disabled. This brings consistency
between the server settings and the management settings and allows '0'
to be used to pick a random port.
Fixed gh-311
Fix `ConfigFileApplicationListener` to repeatedly load property sources
and activate profiles using any defined `spring.active.profiles`
properties.
This restores the ability to have a property in a profile specific
file that defines additional profiles.
Fixes gh-308
Fix package tangle between the `org.springframework.boot` and the
`event` sub-package. A new `SpringApplicationRunParticipant` abstraction
has been introduced, with the `event` package solely responsible for
handling event multi-casting.
Detect when an application is running in development (by the presence
of a build file) and automatically add a 'development' profile.
Additional detectors can be developed by implementing the
`ProfileDetector` interface and registering with the `SpringApplication`
Fixes gh-296
Update SpringApplication so that ApplicationListener and
ApplicationInitializer methods must be called separately. This helps
to prevent unexpected side effects when calling the setters and
also encourages separation of concerns.
The few situations where a class was both an ApplicationInitializer
and ApplicationListener are now handled by registering an inner
listener from the `initialize` method.
Update the CLI Groovy InnerLoader to not expose URLs. This prevents the
'TLD skipped' log messages from Tomcat that occurred previously due to
the InnerLoader and parent returning the same URLs.
Fixes gh-277
BeanFactory.getBean() already looks in the parent context
so we have to be careful and not use the parent when locating
the report singleton
Fixes gh-290