Commit Graph

1239 Commits (1.4.x)

Author SHA1 Message Date
Phillip Webb e03e109874 Polish 8 years ago
Stephane Nicoll 7e6f4021de Polish contribution
Closes gh-6059
8 years ago
RichardCSantana 42bb843364 Fix Bug HealthIndicator for Redis Cluster
See gh-6059
8 years ago
Andy Wilkinson 91df749839 Improve usage of ConcurrentMap
- Call get rather than containsKey then get
- Only call putIfAbsent after get has returned null to avoid unnecessary
  object creation

Closes gh-6382
8 years ago
Adrian Cole 38e3b39d3b Improves metrics performance by not guarding map.get
ConcurrentHashMap implements `containsKey` with `get`. By removing a
redundant call to `containsKey`, we guarantee better performance in our
counter services.

The geek inside measured this with JMH, and found under 4 threads of
contention, throughput on this check was 40% higher in success case.

Benchmark                                  Mode  Cnt     Score     Error   Units
TestBenchmarks.containsKeyAndGet_success  thrpt   30   432.389 ±  20.616  ops/us
TestBenchmarks.get_success                thrpt   30   606.789 ±  10.848  ops/us

Closes gh-6379
8 years ago
Johnny Lim a9f6ae4422 Polish
Closes gh-6374
8 years ago
Andy Wilkinson 8e669e2eef Merge branch '1.3.x 8 years ago
Andy Wilkinson 4963cfd67b Reset thread's interrupted flag when catching InterruptedException
Closes gh-6360
8 years ago
Andy Wilkinson e53d3167ab Set TCCL of shutdown thread when triggered by the shutdown endpoint
Previously, the shutdown endpoint would spawn a new thread to perform
the shutdown but did not explicitly configure its thread context
class loader (TCCL). This mean that the new thread would use the
request thread's TCCL as its TCCL. This meant that a different TCCL
would be used compared to a shutdown triggered by the shutdown hook
and also caused problems with Tomcat's thread leak detection logic.

This commit updates the shutdown endpoint to explicitly configure the
TCCL of the shutdown thread to be the ClassLoader that loaded the
endpoint's class.

Closes gh-6361
8 years ago
Andy Wilkinson c974de0119 Merge branch '1.3.x 8 years ago
Andy Wilkinson 5f751fe356 Set TCCL of shutdown thread when triggered by the shutdown endpoint
Previously, the shutdown endpoint would spawn a new thread to perform
the shutdown but did not explicitly configure its thread context
class loader (TCCL). This mean that the new thread would use the
request thread's TCCL as its TCCL. This meant that a different TCCL
would be used compared to a shutdown triggered by the shutdown hook
and also caused problems with Tomcat's thread leak detection logic.

This commit updates the shutdown endpoint to explicitly configure the
TCCL of the shutdown thread to be the ClassLoader that loaded the
endpoint's class.

Closes gh-6361
8 years ago
Phillip Webb bd65045285 Allow WebRequestTraceFilter header post processing
Update WebRequestTraceFilter so that additional post processing can be
applied to traced request headers. The postProcessRequestHeaders method
can be used to remove or change map entries before they are returned.

Fixes gh-6309
8 years ago
Andy Wilkinson 5bfc6a50fd Remove accidental usage of Type.getTypeName() which is a Java 8 API
Closes gh-6325
8 years ago
Spring Buildmaster 2216369348 Next Development Version 8 years ago
Lari Hotari 9f07e94450 Add MVC actuator endpoint for heap dumps
Add MVC only endpoint to obtain GZip compressed heap dump files.

See gh-5670
8 years ago
Lari Hotari e1893f66ce Extract AbstractMvcEndpoint class
Extract common functionality from Spring MVC only endpoints.

See gh-5670
8 years ago
Phillip Webb b732aeb453 Polish 8 years ago
Andy Wilkinson 5c6537c234 Consistently synchronize on this.monitor in InMemoryAuditEventRepository
See gh-6261
9 years ago
Andy Wilkinson 92bb24e365 Avoid synchronizing on this and use an internal monitor instead
Where possible, code that previously synchronized on this (or on the
class in the case of static methods) has been updated to use an
internal monitor object instead. This allows the locking model that's
employed to be an implementation detail rather than part of the
class's API.

Classes that override a synchronized method continue to declare
the overriding method as synchronized. This ensures that locking
is consistent across the superclass and its subclass.

Closes gh-6262
9 years ago
Phillip Webb 516df88ea0 Revisit AuditEventRepository interface
Update AuditEventRepository to restore support for `null` arguments and
explicitly Javadoc their meaning.

See gh-5854
9 years ago
Stephane Nicoll 3ba2b24301 Polish "Improve AuditEventRepository"
Closes gh-5854
9 years ago
Vedran Pavic 5f19323fbd Improve AuditEventRepository
See gh-5854
9 years ago
Phillip Webb 266445aaf0 Polish 9 years ago
Johnny Lim 5bc9d5b380 Polish
Closes gh-6244
9 years ago
Stephane Nicoll 84b2ff5c38 Polish "Add ability to filter cookies in trace data"
Closes gh-6018
9 years ago
Venil Noronha fde5e1b6a5 Add ability to filter cookies in trace data
See gh-6018
9 years ago
Andy Wilkinson 618535f576 Polish “Allow management server SSL to be configured independently”
This commit polishes b0fbc7e, throwing an exception when an attempt is
made to configure management-specific SSL without also configuring a
custom management port. The testing of management-specific SSL
configuration has also been improved.

See gh-6057
Closes gh-4810
9 years ago
Alex Antonov 3546ae399e Allow management server SSL to be configured independently
Closes gh-6057
9 years ago
Phillip Webb 15670b8e28 Relocate Neo4J auto-configuration
Move Neo4J auto-configuration from `autoconfigure.neo4j` to
`autoconfigure.data.neo4j` since it's intrinsically linked to Spring
Data.

See gh-5458
See gh-6142
9 years ago
Stephane Nicoll fda2505be6 Fix checkstyle violations 9 years ago
Stephane Nicoll 2dc6e5b6fa Refactor Jest auto-configuration package space
This commit moves the Jest auto-configuration from `spring.jest` to
`spring.elasticsearch.jest`

Closes gh-6032
9 years ago
Andy Wilkinson e5827f4840 Merge branch '1.3.x' 9 years ago
Andy Wilkinson 6c8f8c9d82 Better diagnotics when ESCF subclass breaks with custom management port
When a custom management.port is used, the child context is configured
with an EmbeddedServletContainerFactory bean that has the same class
as the parent context’s EmbeddedServletContainerFactory bean. This
ensures that the child context uses the same type of embedded container
as its parent when there are multiple embedded containers on the
classpath. It also causes a failure when the custom
EmbeddedServletContainerFactory subclass cannot be instantiated, for
example because it’s an anonymous inner-class.

This commit improves the diagnostics so that we fail fast with an
information exception message when we detect that the embedded servlet
container factory bean’s class cannot be instantiated.

Closes gh-6193
9 years ago
Phillip Webb 7446235ff4 Polish 9 years ago
Phillip Webb c136054e69 Merge branch '1.3.x' 9 years ago
Phillip Webb 5b97981c87 Polish 9 years ago
Andy Wilkinson f28e3d54c5 Upgrade to Tomcat 8.5.3
This commit changes the default version of Tomcat to 8.5.3 while
also retaining support for Tomcat 8.0 and 7.0. The main difference
in 8.5 is that the ServerSocketFactory abstraction that allowed the
TrustStore and KeyStore to be configured programatically no longer
exists. This logic has been replaced with the use of a custom URL
protocol (springbootssl) that provides access to the key store and
trust store of an SslStoreProvider. In addition to working with 8.5,
this approach has the advantage of also working with 8.0 and 7.0.

Closes gh-6164
9 years ago
Stephane Nicoll 06b81cf16f Use `@AliasFor` when applicable
This commit adds `@AliasFor` meta-data to annotations that declare an
alias attribute.

`@ConditionalOnProperty` and `@AutoconfigureRestDocs` were not migrated
due to the use of `AnnotationMetadata#getAnnotationAttributes`.

Closes gh-5187
9 years ago
Andy Wilkinson 971913e672 Polish 9 years ago
Stephane Nicoll 3799496dc8 Merge branch '1.3.x' 9 years ago
Stephane Nicoll 9abca48a7f Fix HAL browser entry point with contextPath
Previously, if the `contextPath` of the application wasn't the root, the
HAL browser could not initialize since the `entryPoint` was referring to
an invalid location.

This commit makes sure to take the `contextPath` into account.

Closes gh-5814
9 years ago
Andy Wilkinson fa0a137cd2 Merge branch '1.3.x' 9 years ago
Andy Wilkinson a2446080bc Prevent GC pressure from causing an NPE in SimpleInMemoryRepository
Previously, SimpleInMemoryRepository used a ConcurrentReferenceHashMap
to store its locks. The type of map will discard its entries when the
JVM comes under GC pressure. With the code in its previous form, this
could lead to a NullPointerException when the following occurred:

1. putIfAbsent returned null indicating that a new entry has been added
   to the map
2. GC pressure caused the map to discard the new entry
3. get returned null as the entry has been discard

There are two problems with the existing code:

1. Its usage of a ConcurrentMap is incorrect. The correct usage is:
   a. Call get to see if the map already contains a lock
   b. If the lock is null, create a new one
   c. Call putIfAbsent to add the new lock
   d. If the return value is non-null, another thread has created the
      lock and it should be used. If the return value is null, use the
      new lock created in b.
2. Once the use of ConcurrentMap has been corrected, the fact that it is
   a ConcurrentReferenceHashMap means that different threads could
   access the same value using different locks. This would occur if one
   thread has retrieved a lock from the map and is using it, while GC
   causes the lock to be removed from the map. Another thread then
   attempts to get the lock and, as GC pressure has remove it, a new
   lock is created allowing concurrent access to the same value.

This commit updates the code to use the ConcurrentMap correctly and also
replaces the ConcurrentReferenceHashMap with a ConcurrentHashMap. This
means that the repository will now use slightly more memory but this is
outweighed by the benefits of thread-safe updates and no risk of an NPE.

Closes gh-6115
9 years ago
Stephane Nicoll 64bbefd3ac Add Jest-based health indicator
This commit adds a Jest-based health indicator for ElasticSearch. If both
Jest and the Spring Data are available, the latter takes precedence as it
provides more information.

Closes gh-3178
9 years ago
Phillip Webb ee319a6d8b Merge branch '1.3.x' 9 years ago
Johannes Edmeier e89063cc07 Close connection after use in LiquibaseEndpoint
Update LiquibaseEndpoint so that connections are closed and returned to
the pool after use.

Fixes gh-6118
9 years ago
Phillip Webb 99c6194e17 Don't use MockitoJUnitRunner
Replace `@RunWith(MockitoJUnitRunner.class)` with direct Mockito
initialization since the running doesn't support parallel test
execution.
9 years ago
Johnny Lim 8704e4869d Polish
Closes gh-6066
9 years ago
Phillip Webb 14c7a1284e Formatting 9 years ago
Stephane Nicoll b02aba4c75 Polish contribution
Closes gh-5074
9 years ago
Vedran Pavic 20fa1b3b48 Support configuration of multiple management roles
Closes gh-5045
9 years ago
Stephane Nicoll 6698af08df Replace Starter POM to Starter in the documentation
"Starter POM" is a confusing term as it implies the starter may be a
POM while it's actually a jar artifact like any other dependency. To
reduce the confusion (especially in the way such starter should be
declared in the build), the term Starter POM has been renamed to Starter.

Closes gh-5966
9 years ago
Phillip Webb 68983400fb Propogate startup failures to management context
Update EndpointWebMvcAutoConfiguration so that ApplicationFailedEvents
cause the management context to close.

Prior to this commit if an application failed to start (for example
because `server.port` was already in use) the management context would
remain open and the application would not exit.

Fixes gh-5388
9 years ago
Ruben Dijkstra c84e09f611 Fix incorrect usage of Assert.notNull()
Closes gh-5931
9 years ago
Phillip Webb cf6212b955 Polish 9 years ago
Spring Buildmaster 819a9574a6 Next Development Version 9 years ago
Andy Wilkinson 3348ed5bb3 Make use of new GetMapping and PostMapping annotations
Closes gh-5277
9 years ago
Spring Buildmaster 376bbe68d8 Next Development Version 9 years ago
Dave Syer 0ec5b7f43b Fix some more tests 9 years ago
Dave Syer 95c78e4e4c Fix test 9 years ago
Dave Syer 323d6e54a9 Add backwards compatible constructor to InfoEndpoint
Anyone who is extending InfoEndpoint (per the docs) in 1.3 can
continue to compile their code until they have time to adapt
to the new model.
9 years ago
Stephane Nicoll 21536f64e1 Polish info contributor feature
This commit improves the `InfoContributor` infrastructure as follows:

* `InfoEndpoint` no longer breaks its public API and returns a Map as
before
* `Info` is now immutable
* All properties of the build are now displayed. Since we control the
generation of that file, there is no longer a mode to restrict what's
shown
* Build info is now generated in `META-INF/build-info.properties` by
default

Closes gh-5734
9 years ago
Vedran Pavic 0b70710bbc Allow customization of AuditListener
Introduce `AbstractAuditListener` so that users can extended it to
replace the auto-configured default.

Fixes gh-5830
9 years ago
Johnny Lim 0efa0038c3 Polish
Closes gh-5815
9 years ago
Phillip Webb 590bd5c084 Fixup warnings 9 years ago
Phillip Webb 609cb52cd4 Move to relocated web classes
Refactor code to move from recently deprecated classes.

Closes gh-5822
9 years ago
Phillip Webb aea18671c1 Restructure web related classes
Reorganize web related classes for better separation of concerns.
Mainly this involves moving classes from `o.s.b.context.embedded`
that aren't directly tied to embedded servlet containers to
`o.s.b.web` and relocating everything from `o.s.b.context.web`.

See gh-5822
9 years ago
Phillip Webb a7cb689f95 Move @LocalServerPort annotation
Move the @LocalServerPort to org.springframework.boot.context.embedded
since it's only really useful when working with embedded servlet
containers.

See gh-5822
9 years ago
Johannes Edmeier 49ef93602e Add external-file-property to LogFileMvcEndpoint
Add an additional property to LogFileMvcEndpoint to allow log files to
be read from an external location. This is helpful when a launch.script
is used to start the boot-application and the logfile is written by a
redirect of stdout/stderr.

Fixes gh-4255
Closes gh-4836
9 years ago
Stephane Nicoll 5f41e82a89 Merge branch '1.3.x' 9 years ago
Stephane Nicoll 247685e992 Add missing `@Documented`
Closes gh-5786
9 years ago
Venil Noronha 0d47abbac4 Extract ApplicationContextHeaderFilter
Extract ApplicationContextHeaderFilter to a top-level class from
EndpointWebMvcAutoConfiguration and make the header field public.

Fixes gh-5726
Closes gh-5784
9 years ago
Phillip Webb 93382648ab Formatting 9 years ago
Phillip Webb 79922360e1 Polish 9 years ago
Dave Syer 014883253a Merge remote-tracking branch 'origin/1.3.x' 9 years ago
Dave Syer b9db4742ac Add metric flusher to export remaining metrics on shutdown
Before this change the app context closes and metrics that have not
yet been exported ccan be orphaned. The design of this feature is simple:
use Closeable where possible, so that it will be called automatically
by Spring on shutdown.

Fixes gh-5771
9 years ago
Dave Syer de2c22efee Merge remote-tracking branch 'origin/1.3.x' 9 years ago
Dave Syer de0f0ecce4 Align counter behaviour between metric exporters
The MetricCopyExporter has had the capability for a while to keep
track of counters internally. This change aligns that with the
PrefixMetricGroupExporter.

Fixes gh-5762
9 years ago
Andy Wilkinson 58dac43b8d Update TraceWebFilterAutoConfiguration to use constructor injection 9 years ago
Andy Wilkinson 13c01376b0 Merge branch '1.3.x' 9 years ago
Andy Wilkinson 9210029109 Record trace with response status of 500 following unhandled exception
Previously, if the filter chain threw an unhandled exception,
WebRequestTraceFilter would record a trace with a response status of
200. This occurred because response.getStatus() would return 200 as
the container had not yet caught the exception and mapped it to an
error response.

This commit updates WebRequestTraceFilter to align its behaviour with
MetricsFilter. It now assumes that the response status will be a 500
and only updates that to the status of the response if the call to the
filter chain returns successfully.

To avoid making a breaking change to the signature of the protected
enhanceTrace method, an HttpServletResponseWrapper is used to include
the correct status in the trace.

Closes gh-5331
9 years ago
Andy Wilkinson a2489b01aa Merge branch '1.3.x' 9 years ago
Andy Wilkinson 2e54078083 Tolerate possible null Flyway MigrationVersion when using Flyway 4.0
Flyway 4.0 provides support for repeatable migrations that do not
have a version. When such a migration has been performed,
MigrationInfo.getMigrationVersion() will return null and, previously,
FlywayEndpoint would fail with an NPE.

This commit updates FlywayEndpoint to use null as the version when
MigrationInfo.getMigrationVersion() returns null.

Closes gh-5700
9 years ago
Phillip Webb 5881c9c74f Polish 9 years ago
Stephane Nicoll cc0fc07c0e Move `shell.*` to `management.shell.*`
This commit moves the `shell` namespace to `management.shell`

Closes gh-5703
9 years ago
Stephane Nicoll 6d11d73cbc Move `shell.auth` to `shell.auth.type`
This commit moves the `shell.auth` property to `shell.auth.type`. The
previous situation was unfortunate since `shell.auth` was both a group
and a particular property.

Closes gh-5139
9 years ago
Stephane Nicoll f364d713dd Add `LocalManagementPort`
Add an annotation alias for the actual management port, similar to what
was done for the main context (`LocalServerPort`).

See gh-5548
9 years ago
Johnny Lim 030096c490 Polish
Closes gh-5661
9 years ago
Phillip Webb 7956e68224 Fix warnings 9 years ago
Johnny Lim a0c8d1f5b5 Polish 9 years ago
Phillip Webb ae249f7568 Merge branch '1.3.x' 9 years ago
Phillip Webb a1284bce61 Configure ChildManagementContext container type
Ensure any ChildManagementContext created to start a management server
on a different port uses the same EmbeddedServletContainerFactory type.

Fixes gh-5474
9 years ago
Phillip Webb 3ca365cff0 Export MessageChannel metric writer
Update the auto-configured MessageChannelMetricWriter with
@ExportMetricWriter so that metrics are actually exported.

Fixes gh-5517
9 years ago
Phillip Webb 6550bb4cf1 Polish 9 years ago
Johnny Lim 3b5ecbd066 Polish
Closes gh-5627
9 years ago
Phillip Webb 01c9d72644 Polish 9 years ago
sebastiankirsch a15684e67e Allow per-http-method MetricsFilter submissions
Add `endpoints.metrics.filter.gauge-submissions` and
`endpoints.metrics.filter.counter-submissions` properties which can be
used to fine-tune how MetricsFilter submits metrics.

Use `per-http-method` to group by the the HTTP method, `merged` to
combine or both (`merged,per-http-method`) to submit both in forms.

Closes gh-5102
9 years ago
Stephane Nicoll 05ef0818f8 Polish contribution
Closes gh-5511
9 years ago
Huang YunKun 6a2ff3f02a Upgrade elasticsearch to 2.2.0
Closes gh-5443
9 years ago
Phillip Webb b398b3319c Rename @SpringApplicationTest -> @SpringBootTest
Rename @SpringApplicationTest to SpringBootTest and
@SpringApplicationContextLoader to @SpringBootContextLoader.

Fixes gh-5562
9 years ago
Phillip Webb 4d404b214c Migrate away from @SpringApplicationConfiguration
Refactor internal tests to no longer use @SpringApplicationConfiguration

See gh-5562
9 years ago
Andy Wilkinson 33f0ea3480 Rework SpringApplicationTest to support web modes
Rework the new testing support so that @SpringApplicationTest can be
used for standard integration tests, web integration tests with a
mock Servlet environment and web integration tests with an embedded
servlet container. This means that it a replacement for 1.3's
@IntegrationTest and @WebIntegrationTest and allows all
SpringApplication testing to be configured using a common annotation.

The old @IntegrationTest and @WebIntegrationTest along with their
supporting classes have been reinstated to their previous form (while
remaining deprecated). This should ensure that they continue to work
in 1.4 exactly as they did in 1.3 giving users a smooth path to
@SpringApplicationTest.

See gh-5477
9 years ago
Phillip Webb 8a11620052 Fix failing test due to SPR-14093 9 years ago
Stephane Nicoll 928f2dfc91 Sanitize keys with 'token' by default
This commit updates `Sanitizer` to sanitize by default a key containing
`token`.

Closes gh-5462
9 years ago
Phillip Webb a3bfc29e6e Fix warnings 9 years ago
Stephane Nicoll fd437797b6 Polish contribution
This commit polihes the original Neo4j contribution in several areas.

Rather than providing the packages to scan, this commit rearranges the
`EntityScan` and `EntityScanRegistrar` so that the logic can be shared
for other components. If no package is provided, scanning now defaults to
the "auto-configured" package(s) and a `@NodeEntityScan` annotation
allows to override that.

The configuration has also been updated to detect the driver based on the
`uri` property. If the embedded driver is available we use that by
default. If it is not available, we're trying to connect to a Neo4j
server running on localhost. It is possible to disable the embedded mode
or set the `uri` parameter explicitly to deviate from these defaults.

The sample no longer relies on the embedded driver for licensing reason:
rather it expects an instance running on localhost (like other
data-related samples) and gracefully ignore any connection error. A
README has been added in the sample to further explain the available
options;

Closes gh-5458
9 years ago
Michael Hunger 0658cc8aee Add Neo4j support
See gh-5458
9 years ago
Phillip Webb c28f552883 Migrate SpringJUnit4ClassRunner to SpringRunner
Replace all existing SpringJUnit4ClassRunner references with the new
SpringRunner alias.

Fixes gh-5292
9 years ago
Phillip Webb 2f815a907a Migrate existing tests from deprecated package
Update the existing tests to use the relocated `spring-boot-test`
classes. Restructuring was achieved using the following command:

find . -type f -name '*.java' -exec sed -i '' \
-e s/org.springframework.boot.test.ConfigFileApplicationContextInitializer/\
org.springframework.boot.test.context.ConfigFileApplicationContextInitializer/g \
-e s/org.springframework.boot.test.EnvironmentTestUtils/\
org.springframework.boot.test.util.EnvironmentTestUtils/g \
-e s/org.springframework.boot.test.IntegrationTest/\
org.springframework.boot.test.context.IntegrationTest/g \
-e s/org.springframework.boot.test.IntegrationTestPropertiesListener/\
org.springframework.boot.test.context.IntegrationTestPropertiesListener/g \
-e s/org.springframework.boot.test.OutputCapture/\
org.springframework.boot.test.rule.OutputCapture/g \
-e s/org.springframework.boot.test.SpringApplicationConfiguration/\
org.springframework.boot.test.context.SpringApplicationConfiguration/g \
-e s/org.springframework.boot.test.SpringApplicationContextLoader/\
org.springframework.boot.test.context.SpringApplicationContextLoader/g \
-e s/org.springframework.boot.test.SpringBootMockServletContext/\
org.springframework.boot.test.mock.web.SpringBootMockServletContext/g \
-e s/org.springframework.boot.test.TestRestTemplate/\
org.springframework.boot.test.web.client.TestRestTemplate/g \
-e s/org.springframework.boot.test.WebIntegrationTest/\
org.springframework.boot.test.context.web.WebIntegrationTest/g {} \;

See gh-5293
9 years ago
Phillip Webb aef7f4bcb1 Restructure spring-boot-test packages
Create a new package structure for `spring-boot-test` and deprecate
existing classes.

Fixes gh-5293
9 years ago
Phillip Webb 4352707eb3 Call afterProperties set in LogFileMvcEndpoint
Call afterPropertiesSet on the delegate `ResourceHttpRequestHandler`
to prevent an NPE. This change is required following SPR-13834.
9 years ago
Andy Wilkinson 19d8c5e6f6 Complete the move to constructor injection in configuration classes
This is a follow-on from the work done in 5009933. Now that SPR-14015
has been fixed, constructor injection can also be used for parameterised
dependencies, including optional dependencies that are injected via
an ObjectProvider.

Closes gh-5306
9 years ago
Phillip Webb 7942d9f787 Polish 9 years ago
Stephane Nicoll 2ae1435916 Polish 9 years ago
Stephane Nicoll 24f09e28c4 Prevent Redis to be initiated
This commit excludes the Redis auto-configuration that would attempt
to connect to a redis instance running at localhost otherwise.
9 years ago
Stephane Nicoll f699bd2435 Fix build
`@ManagedResource` annotated bean must be public.
9 years ago
Stephane Nicoll 2526a54e31 Polish contribution
Closes gh-5337
9 years ago
Anand Shah f6a32a1d5a Add `@LocalServerPort`
Closes gh-5262
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 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
Phillip Webb a3f3de223f 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
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 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 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 7029ba521d Remove `management.dump_requests` property
Closes gh-4283
9 years ago
Andy Wilkinson ef5087c5ee Upgrade to Jackson 2.7.2
Closes gh-5081
9 years ago
Andy Wilkinson 355860fd09 Remove @Autowired from constructors where class has single constructor
Closes gh-5226
9 years ago
Stephane Nicoll 6741f05af1 Polish contribution
Closes gh-4903
9 years ago
Eddú Meléndez 98cc68364a Add Caffeine cache support
See gh-4899
9 years ago
Spring Buildmaster 225d877ab9 Next Development Version 9 years ago
Andy Wilkinson ccf7de904c Upgrade to Infinispan 8.1.2.Final
Closes gh-5245
9 years ago
Andy Wilkinson fcb5f03146 Upgrade to Hazelcast 3.6
Closes gh-5237
9 years ago
Andy Wilkinson 56487d23d6 Merge branch '1.3.x' 9 years ago
Vedran Pavic 6801e8208d Fix namespace declarations in Hazelcast xml's and make them consistent 9 years ago
Andy Wilkinson 44ddfcc7fa Upgrade copyright headers of all files changed in 2016 9 years ago
Andy Wilkinson d3fc0a4733 Placate javac and its inferior type inferencing
The Eclipse compiler is perfectly happy with the original code, but
javac is not. This commit adds some explicit typing to keep javac
happy.
9 years ago
Andy Wilkinson ef44d660bb Merge branch '1.3.x' 9 years ago
Andy Wilkinson ce71bd997c Remove redundant public modifier 9 years ago
Andy Wilkinson 8f1f12be6a Fix Checkstyle warning introduced in forward merge (852ba546) 9 years ago
Andy Wilkinson bee651fc17 Merge branch '1.3.x' 9 years ago
Andy Wilkinson 13971692dc Docs and actuator endpoints can be enabled when endpoints.enabled=false
Previously, if endpoints.enabled was false setting
endpoints.docs.enabled=true or endpoints.actuator.enabled=true would
have no effect as their entire configuration class was conditional
on endpoints.enabled being true.

This commit updates the conditions on the configuration class so that
it is conditional on either the actuator or docs endpoint being enabled.

Closes gh-5007
9 years ago
Andy Wilkinson 852ba54613 Merge branch '1.3.x' 9 years ago