Commit Graph

7210 Commits (78c82add7260785d5cc68825a4fb9599995ee6fb)
 

Author SHA1 Message Date
Stephane Nicoll 78c82add72 Merge pull request #5392 from michael-simons/patch-1
* pr/5392:
  Add link to wro4j-spring-boot-starter
9 years ago
Michael Simons 87548a0bc0 Add link to wro4j-spring-boot-starter
Closes gh-5392
9 years ago
Stephane Nicoll d22265b13e Allow to disable debug property
Previously, adding `debug=false` in the environment had no effect as the
mere presence of the property was used to enable the debug mode. This
commit makes sure to also check the value and ignore the property if it
is set to `false`.

The documentation has also been updated to refer to the `trace` property.

Closes gh-5374
9 years ago
Stephane Nicoll 8cb602f2d6 Polish doc
Closes gh-5375
9 years ago
Stephane Nicoll dddea70985 Collect and display build information
This commit updates the Maven plugin to generate a
`META-INF/boot/build.properties` file with various build-specific
settings (group, artifact, name, version and build time). Additionally,
the plugin can be configured to write an arbitrary number of additional
properties.

A new `BuildProperties` bean is automatically exposed when such a file is
present. If that bean is present, an `InfoContributor` is automatically
created to expose that information under the `build` key.

As for the git contributor, it is possible to only display the core
settings or everything using the `management.info.build.mode` property.

See gh-2559
9 years ago
Stephane Nicoll 3e6b584953 Add Date as a support property type
Rather than exposing a raw String with the epoch time, GitProperties
now exposes the actual `java.util.Date`. `InfoProperties` has been
improved to return such data type when the raw value is an epoch time.
9 years ago
Stephane Nicoll a508864d6f Merge pull request #5384 from izeye/polish-20160310
* pr/5384:
  Polish
9 years ago
Johnny Lim 1d02184b44 Polish
Closes gh-5384
9 years ago
Stephane Nicoll b8dc4e74e4 Deprecate ConfigurationProperties#location
Closes gh-5129
9 years ago
Stephane Nicoll 58e8e10abb Fix typo
Closes gh-5343
9 years ago
Stephane Nicoll b906b18655 Initiate GitProperties
This commit polish the new info contributor infrastructure by migrating
`GitInfo` to `GitProperties`. `InfoProperties` provides an abstraction
that exposes unstructured data in an immutable way.

The `GitInfoContributor` now accepts a "mode" that determines if all data
should be exposed or only a sub-set of known keys.

Closes gh-2644
9 years ago
Andy Wilkinson 474aed0541 Make context available when handling refresh failure
Previously, if SpringApplication.run failed due to the refresh of the
application context throwing an exception, the application context
would not be available during run failure handling. This meant that
null was passed to any SpringApplicationRunListeners, however the
javadoc for the finished method does not indicate that it is possible
for null to be passed in. In addition to the possibility of a
NullPointerException, a side-effect of this behaviour was that the
auto-configuration report was not produced when refresh fails, making
it useless as a tool for diagnosing refresh failures.

This commit updates SpringApplication to take a reference to the
application context as early as possible and, crucially, before it
has been refreshed. This means that refresh no longer has to succeed for
the context to be passed to any SpringApplicationRunListeners and that
they will now receive an inactive context, rather than a null context in
the event of a refresh failure.

Closes gh-5325
9 years ago
Andy Wilkinson 427d3140b3 Remove unwanted printing of stack trace from the Launcher
Previously, the Launcher would call ex.printStackTrace for any
exception that was thrown when launching the application. This was
unnecessary as the stack trace should already have been logged by
the application when it failed to start.

This commit removes the call to ex.printStackTrace, thereby allowing
an exception to be logged only once or not at all after successful
failure analysis.

Closes gh-5358
9 years ago
Andy Wilkinson ff509eecba Improve failure diagnostics for messing Bean Validation provider
When the bean validation API is on the class path, but there is no
provider available, the stack trace that results is pretty much
useless. All the user needs to know is that the have the Bean
Validation API on the class path and that they should also add
an implementation, such as Hibernate Validator, if they want to
use validation.

This commit introduces a FailureAnalyser for ValidationException,
that returns a FailureAnalysis when the ValidationException is a
result of the situation described above.

Closes gh-5332
9 years ago
Andy Wilkinson 6035fe4c48 Make it easier to run JUnit tests against a subset of the class path
Due to `@ConditionalOnClass` and `@ConditionalOnMissingClass`, the
behaviour of many auto-configuration classes is dependant on the
contents of the class path, yet we do not have a lightweight way of
testing such classes against a specific class path.

This commit introduces FilteredClassPathRunner, a JUnit Runner that
runs a class’s tests using a filtered class path. A
`@ClassPathExclusions` annotation on a test class can be used to
filter entries from the project’s default class path, thereby allowing
a configuration class’s behaviour in the presence or absence of
certain classes to be tested more easily.

Closes gh-5359
9 years ago
Phillip Webb b260c20df0 Support JsonSerializer/JsonDeserializer Beans
Add a `@JsonComponent` annotation that can be used to indicate that a
Bean is a JsonSerializer and/or JsonDeserializer that should be
registered with Jackson.

Support is provide via a new `JsonComponentModule` which is
auto-configured in `JacksonAutoConfiguration`.

Also add `JsonObjectSerializer` and `JsonObjectDeserializer` classes
which provided as a convenient base for serializers that work with
Objects.

Fixes gh-3898
9 years ago
Phillip Webb a3f3de223f Polish 9 years ago
Phillip Webb 644ae2c21a Merge branch '1.3.x' 9 years ago
Phillip Webb 5e722dae6a Polish 9 years ago
Andy Wilkinson d7d2404c23 Ensure that Tomcat does not report unstopped main thread when startup fails
Following the changes made in ff99bb07, Tomcat’s WebAppClassLoader is
set as the thread context class loader of the main thread. If Tomcat
was stopped while the main thread was still running (typically as a 
result of a startup failure), this had the unwanted side-effect of
causing Tomcat to report that the application had started a thread named
main and had failed to stop it.

This commit updates TomcatEmbeddedServletContainer so that, during stop
processing, the current thread’s context class loader is reset before
Tomcat is stopped. This prevents Tomcat from incorrectly believe that
the application has started and failed to stop the main thread.

Closes gh-5357
9 years ago
Stephane Nicoll cc2f6f4b9c Merge branch '1.3.x' 9 years ago
Stephane Nicoll a83dae0e10 Polish contribution
Closes gh-5335
9 years ago
Eric Bottard 79cd01eb7a Fix configuration property name when group is empty
See gh-5335
9 years ago
Stephane Nicoll 9bbde5b340 Properly guard validation support
Prevent the validation support to kick in if the Validation API is not
available.

Closes gh-5353
9 years ago
Andy Wilkinson 86d87f6b8a Deprecate support for Velocity
Support for Velocity has been deprecated in Spring Framework 4.3 with
the plan being to remove it in 5.0. This commit deprecates Spring
Boot's support in 1.4, with the plan being to remove it in 2.0.

Closes gh-5276
9 years ago
Stephane Nicoll ad53f09ed4 Improve Couchbase repository support
Previously, if Couchbase was available on the classpath but not
configured, Spring Boot would attempt to scan the project for
repositories anyway.

This commit makes sure that it only happens if an infrastructure
bean required is present. The tests have also been rewritten to better
reflect what would happen in practice.

Closes gh-5349
9 years ago
Andy Wilkinson bbd7840785 Allow LoggingSystem to be disabled
In certain environments, such as Jetty configured with centralized
logging, Spring Boot's logging system can be problematic.

This commit adds support for using the existing LoggingSystem system
property, configured with a value of none, to disable the logging
system and rely on the standard logging configuration mechanism for
whatever logging framework is in use.

Closes gh-3571
9 years ago
Andy Wilkinson a578488bab Merge pull request #5310 from Felipe Rotilho
* gh-5310:
  Upgrade to Gson 2.6.2
9 years ago
Felipe Rotilho 00bb936c4b Upgrade to Gson 2.6.2
Closes gh-5310
9 years ago
Stephane Nicoll b8a315d8d0 Merge pull request #5345 from izeye/polish-20160306
* pr/5345:
  Polish
9 years ago
Johnny Lim 122270c990 Polish
Closes gh-5345
9 years ago
Stephane Nicoll 830c4c996f Update computation of ehcache statistics
Previously, the ehcache statistics were computed on the activity of the
last minute which gives a "live" overview. All others cache managers,
including JCache, provides a "cumulative" metrics (i.e. the hit/miss
ratio since the creation of the cache or the last time it got cleared).

Ths commit aligns the ehcache statistics to provide a similar semantics
as the other cache managers. The side effect is that the metrics are now
available, even if there is no cache activity at all at the moment.

Closes gh-4891
9 years ago
Stephane Nicoll d6bc3f0bc6 Fix build
Assert using epoch time
9 years ago
Stephane Nicoll 76edaa7e1e Fix build
Add TimeZone in date assertion
9 years ago
Stephane Nicoll f11fa0c309 Use `java.util.Date` rather than a raw String
This commit updates `GitInfo` to use a proper `java.util.Date` rather
than a raw String. Because the Maven and Gradle plugin do not agree on a
format, `ProjectInfoAutoConfiguration` now registers a `Converter` that
is taking care of translating the raw `String` to a `Date`.

See gh-2484
9 years ago
Andy Wilkinson 5009933788 Move to constructor injection in simple configuration classes
This commit updates "simple" configuration classes to use constructor
injection. Simple means that there are no optional dependencies
(@Autowired(required=false) is not used), and none of the dependencies
use generics.

Configuration classes that are not simple will be updated in a second
pass once https://jira.spring.io/browse/SPR-14015 has been fixed.

See gh-5306
9 years ago
Stephane Nicoll 398aed7fdb Missing entry for ProjectInfoAutoConfiguration 9 years ago
Stephane Nicoll a603201f05 Merge pull request #5328 from anandshah123/feature/gh-5326
* pr/5328:
  Polish contribution
  Rename HealthIndicatorAutoConfigurationProperties
9 years ago
Stephane Nicoll aba9389b25 Polish contribution
Closes gh-5328
9 years ago
Anand Shah 395c36a132 Rename HealthIndicatorAutoConfigurationProperties
Closes gh-5326
9 years ago
Phillip Webb 73cbb2f40a Polish 9 years ago
Stephane Nicoll b0bfc11aa0 Merge pull request #5303 from garyrussell/GH-5302
* pr/5303:
  Polish contribution
  Add Cache Properties for RabbitMQ
9 years ago
Stephane Nicoll d04155fcae Polish contribution
Closes gh-5303
9 years ago
Gary Russell c0cb813a01 Add Cache Properties for RabbitMQ
Closes gh-3502
9 years ago
Stephane Nicoll 13f03b4161 Merge pull request #3492 from mat013/making_infoendpoint_extensible
* pr/3492:
  Polish contribution
  rebase to master
  Info endpoint
9 years ago
Stephane Nicoll 0490fbc7f8 Polish contribution
`InfoProvider` is now `InfoContributor` and contributes to the `Info`
instance via a builder. The `Info` instance is immutable. Each
contributor can be disabled via the `management.info.<name>.enabled`
key or all can be disabled using `management.info.defaults.enabled` (this
is similar to what the health endpoint does).

By default, all keys from the environment starting with `info.` are
exposed. If a `git.properties` file is present in the classpath, the
content of `GitInfo` is exposed using the `git` key.

A `SimpleInfoContributor` and `AbstractEnvironmentInfoContributor` are
available for convenience. `InfoContributor` instances can be ordered
the usual way, with a default order provided by
`InfoProviderAutoConfiguration#DEFAULT_ORDER`.

Closes gh-3492
9 years ago
Stephane Nicoll 7618802838 rebase to master 9 years ago
Meang Akira Tanaka 8bebe6dea9 Info endpoint
See gh-3492
9 years ago
Stephane Nicoll 0f820afa86 Auto-configure GitInfo
This commit moves `GitInfo` to a general "project info" area that will be
further improved with others project related information.

Deprecate `spring.git.properties` in favour of `spring.info.git.location`

Closes gh-2484
9 years ago
Stephane Nicoll 03ecdce4fb Merge pull request #5318 from izeye/polish-20160303
* pr/5318:
  Polish
9 years ago