Commit Graph

490 Commits (70a1438c6fd8de79bdab2990aeb1a3fe32da40e1)

Author SHA1 Message Date
Dave Syer cd092e02dc Remove unecessary Jackson dependency in trace filter 10 years ago
Stephane Nicoll 11894a5412 Fix manual metadata format inconsistency
Fixes gh-1961
10 years ago
Phillip Webb c34cfb27a3 Polish 10 years ago
Dave Syer ae23ba13b5 Fix for Java < 1.8
Uses raw class instead of Java Type API (which has a
default method in 1.8, unavailble in 1.7).
10 years ago
Dave Syer 5d2d39e87d Add EndpointHandlerMappingCustomizer callback
Users can add @Beans of this type to customize the
EndpointHandlerMapping (e.g. add interceptors) even if
it is in a child context.

Fixes gh-1933
10 years ago
Dave Syer 1254508357 Fix tests some more
Eclipse (by default) does not create the JSON metadata when
it compiles the @ConfigurationProperties beans. So running on
the command lilne gets scarily different than in an IDE. Fixed
by externalizing the metadata location and setting it to something
empty in the tests.
10 years ago
Dave Syer 0757d24d91 Fix /configprops tests 10 years ago
Dave Syer 6ad626de49 Allows /configprops endpoint to show nested properties
Including maps and lists. Beans with no metadata (in
/META-INF/*spring-configuration-metadata.json) are just serialized
as they come (so might have problems like cycles). Serialization
errors are caught and rendered as an "error" for that bean. Any
problems can be fixed by preparing metadata and specifying which
properties are to be rendered that way.

Fixes gh-1746, fixes gh-1921
10 years ago
Phillip Webb b583262211 Use SmartInitializingSingleton when possible
Switch implementations of ApplicationListener<ContextRefreshEvent> for
SmartInitializingSingleton when possible.

Fixes gh-1939
10 years ago
Phillip Webb 6cdd27a34d Merge branch '1.1.x' 10 years ago
Phillip Webb f224c7ac9e Find @ConfigurationProperties annotation on proxy
Update ConfigurationPropertiesReportEndpoint to find
@ConfigurationProperties using `context.findAnnotationOnBean` rather
than `AnnotationUtils.findAnnotation`. This will correctly find the
annotation even if the bean is an interface based proxy.

Fixes gh-1927
10 years ago
Stephane Nicoll 16e2130896 Add missing properties metadata
Fixes gh-1829
10 years ago
Phillip Webb 0a6c635f5e Use getMaxActiveSessions() in Tomcat metrics
Replace the getMaxActive() call with getMaxActiveSessions().

Fixes gh-1902
10 years ago
Dave Syer 90d25bd582 Use Set (again) for enumerating MvcEndpoints
This reverts a change that I assume was orphaned from work in
progress to address #1353, but is no longer needed. Anyway
there is no reason to restrict MvcEndpoints to be unique by
path since they can declare their own @RequestMappings
(and if there are duplicates they will be detected when those
are scanned).

Fixes gh-1911
10 years ago
Spring Buildmaster 46b7738334 Next development version 10 years ago
Johannes Stelzer c2a3ccde3e Add Tomcat public metrics for session usage
Fixes gh-1860
10 years ago
Phillip Webb d8c5c3262a Co-locate PublicMetrics auto-configuration
Fixes gh-1900
10 years ago
Phillip Webb 3e02b81e98 Merge branch '1.1.x' 10 years ago
Phillip Webb 52967017a0 Polish 10 years ago
Johannes Stelzer 7770b92411 Add systemload.average to SystemPublicMetrics
Fixes gh-1865
10 years ago
Phillip Webb d097c9a2f9 Formatting 10 years ago
Stephane Nicoll 6df001d30f Fix json format 10 years ago
Stephane Nicoll 00961611b2 Move health.* properties to management.health.*
Fixes gh-1841
10 years ago
Phillip Webb 004904af87 Fix meta-data JSON formatting error 10 years ago
Phillip Webb ea6162254d Update pidfile property and add documentation
Change the pidfile property from `spring.application.pidfile` to
`spring.pidfile` (to save confusion with SpringApplication properties).

Also added documentation and meta-data information.

See gh-1579
10 years ago
Phillip Webb 026b89f58c Support PID file location in Spring Environment
Update ApplicationPidFileWriter to support the Spring Environment,
picking up the `spring.application.pidfile` property if specified.

Fixes gh-1579
10 years ago
Stephane Nicoll fbf8f56a97 Generate standard configuration meta-data
Update the `spring-boot`, `spring-boot-autoconfigure` and
`spring-boot-actuator` project to generate configuration meta-data
files during compilation.

See gh-1001
10 years ago
Phillip Webb d6f2f0deee Merge branch '1.1.x' 10 years ago
Phillip Webb 5f80f3556b Use more specific WebSecurityConfigurer @Bean type
Update ManagementSecurityAutoConfiguration to return
IgnoredPathsWebSecurityConfigurerAdapter rather than
WebSecurityConfigurer<WebSecurity>.
10 years ago
Dave Syer 49fbf215a1 Switch to Dropwizard metrics 3.1.0
Fixes gh-1775
10 years ago
Dave Syer afb7156804 Add missing method for Java 1.7 10 years ago
Dave Syer a284d7bd3f Add Codahale metrics to /metrics endpoint
All metrics in the MetricRegistry have been added unconditionally for now.

Fixes gh-1795
10 years ago
Phillip Webb cf24af0bfb Rework logging to prevent double initialization
Prior to this commit LoggingSystem initialization would happen multiple
times. Once to configure "quiet" logging, and again to configure correct
settings once the Application was initialized. This could cause problems
if `logging.groovy` logback files were used.

The logging system is now only initialized once (when possible) by
following these steps:

- Standard logging initialization occurs via the actual logging
  implementation used (e.g. logback will load a logback.xml file if it
  exists)
- beforeInitization() is called to prevent early log output.
  Implementations now either use a Filter or simply set the root logging
  level.
- initialize() is called with an optional log configuration file (e.g
  a custom logback.xml location) and an optional log output file (the
  default is null indicating console only output).

The initialize() method will attempt to prevent double initialization
by checking if a standard configuration file exists. Double
initialization now only occurs in the following situations:

- The user has a standard configuration file (e.g. classpath:logback.xml)
  but also specifies a logging.config property. Double initialization is
  required since the specified configuration file supersedes the default.
- The user has a standard configuration file (e.g. classpath:logback.xml)
  and specifies a logging.file property. Double initialization is
  required since the standard configuration may use a ${LOG_FILE}
  reference.

In addition this commit removes the `logging.console` option and now
assumes that logging either occurs only to console or to both the
console and a file. This restriction helps simplify the LoggingSystem
implementations. If file only logging is required a custom logback.xml
can be used.

Fixes gh-1091
See gh-1612, gh-1770
10 years ago
Phillip Webb d17b7c8195 Polish 10 years ago
Christian Dupuis 6c66ff78c0 Fix health status aggregation bug 10 years ago
Dave Syer 24e71e868f Allow /health and /info to authenticate anonymously
Then we can optionally find a non-anonymous principal if there
is one. If the user is anonymous then the health result is cached
up to endpoints.health.ttl (default 1000ms) to prevent a DOS attack.

Fixes gh-1353
10 years ago
Phillip Webb 2e7aa4685b Polish 10 years ago
Brett Wooldridge 9984939c47 Update HikariCP to 2.1.0, compile against the Java 6-compatible artifact
For those running applications on Java 8, dependency management for the
Java 8-compatible artifact is also provided.

Closes gh-1721
10 years ago
Dave Syer d251b51338 Integrate with @TestPropertySource
Spring 4.2 has a @TestPropertySource which has some of the features of
@IntegrationTest. This change adds @TestPropertySource to the @IntegrationTest
annotation, so that (for instance) the cache key for the context includes
properties for the test.

Since @IntegrationTest has slightly different semantics I do not propose to
deprecate it. Users can use it or @TestPropertySource, the main difference being that
with @IntegrationTest the Spring Boot context loader is aware of the annotation
and it will set sensible defaults for server.port and spring.jmx.enabled.

There are some reflection hacks to overcome the usual fortifications of Spring Test.

Fixes gh-1697
10 years ago
Andy Wilkinson 7211571969 Fix some grammar issues in docs
Closes gh-1695
10 years ago
Eric Dahl 16937746a0 Fix some grammar issues in docs 10 years ago
Phillip Webb c90633aab6 Polish 10 years ago
Spring Buildmaster 3e71a21b30 Next development version 10 years ago
Phillip Webb dca637f51f Replace @ConditionalOnExpression with OnProperty
Replace where possible all @ConditionalOnExpression annotations with
@ConditionalOnProperty which is both faster to run and more descriptive.

Fixes gh-1685
10 years ago
Andy Wilkinson 6ec0b4ca81 Only consider letters when checking if a name is upper-case
Previously, for a string to be considered upper-case,
EmbeddedServerPortFileWriter required every character in the
string to be upper-case. This meant that strings containing numbers were
considered lower-case even if every letter in the string was upper-case.
OS X’s case-preserving, case-insensitive file system masked this problem
as the tests were still able to find the created file, even though the
case of its name was not as expected.

This commit updates EmbeddedServerPortFileWriter to only require
characters that are letters (as defined by Character.isLetter()) to be
upper-case. It also updates the tests to verify that the case of the
created file’s name is correct in such a way that it will fail, even
on OS X, when it is not.

Fixes gh-1676
10 years ago
Phillip Webb 6a423d7ad1 Add EmbeddedServerPortFileWriter
Add a EmbeddedServerPortFileWriter which can be used to write server
port information to a file.

Fixes gh-1275
Closes gh-1491
10 years ago
Phillip Webb 77ccd9a80b Rename ApplicationPidListener
Rename ApplicationPidListener to ApplicationPidFileWriter (keeping the
old class in a deprecated form)

Fixes gh-1673
10 years ago
Phillip Webb 4c51aa8e28 Polish 10 years ago
Andy Wilkinson b8eb13d827 Fix tests after addition of disk space health indicator 10 years ago
Andy Wilkinson 97178915a4 Polish disk space health indicator
- Supply auto-configuration for the new indicator
 - As suggested in the pull request, include the free disk space and
   configured threshold in the health details
 - Update the documentation to describe the indicator and its
   two configuration settings
 - Use @ConfigurationProperties to bind the indicator's configuration.
   This should make the changes sympathetic to the work being done
   to automate the configuration properties documentation

Closes gh-1297
10 years ago