- 30 Sep, 2015 8 commits
-
-
Andy Wilkinson authored
-
Andy Wilkinson authored
- Add @author tag - Remove unnecessary final modifiers - Avoid writing to volatile field when new gauge is used Closes gh-3977
-
Jay Anderson authored
The previous implementation would remove and add a new Gauge each time a metric was written. After this change the Gauge is registered once and the value is updated on subsequent calls.
-
Andy Wilkinson authored
See gh-3997
-
Andy Wilkinson authored
This commit reverts the changes made for gh-4026. Those changes updated each LoggingSystem to close/stop the underlying logging system as part of the clean up processing. Unfortunately, this approach doesn’t work in an environment where their are multiple application contexts and some have a shorter lifecycle than the “main” application context. In such an environment, closing an application context with a shorter lifecycle prior to the main application context being closed will close/stop the main application context’s logging system as, rather than being scoped to an application context, a logging system is shared across multiple application contexts. (The exact details of how widely shared the logging system is varies between logging systems and, in the case of Logback and Log4J2, also depends on which ContextSelector implementation is being used.
-
Stephane Nicoll authored
Closes gh-2516
-
Stephane Nicoll authored
* pr/4054: Fix typo
-
zhanhb authored
Closes gh-4054
-
- 29 Sep, 2015 15 commits
-
-
Phillip Webb authored
-
Phillip Webb authored
-
Phillip Webb authored
Update RelaxedDataBinder so that both `.` and `_` are considered in getPropertyValuesForNamePrefix(...). With Spring Boot 1.2.5 binding environment variables of the form `FOO_BAR_BAZ` to `@ConfigurationProperties(prefix="foo-bar")` objects worked thanks to a happy accident. When `PropertySourcesPropertyValues` processed a non enumerable `PropertySource` it called the resolver with a property name `FOO_BAR.BAZ`. A `SystemEnvironmentPropertySource` will replace `.` with `_` and hence find a value. Commit 1abd0879 updated non enumerable processing such that the resolver was never called. Replicating the problem is quite involved as you need to ensure that you have both a SystemEnvironmentPropertySource and a non-enumerable property source (e.g. RandomPropertySource). A test has been added to PropertiesConfigurationFactoryTests which passes on 1.2.5, fails on 1.2.6 and passes again following this commit. Fixes gh-4045
-
Andy Wilkinson authored
This commit updates a number of tests in spring-boot to ensure that they close the application contexts that they create. SimpleMainTests still create a number of contexts that are not closed as there’s no (easy) way to get hold of the context when testing the main method. See gh-4053
-
Andy Wilkinson authored
See gh-4026
-
Andy Wilkinson authored
Previously, when a LoggingSystem was cleaned up the underlying logging system (LogBack, Log4J, Log4J2, JUL) was not being properly shut down. LogBack explicitly recommends stopping it cleanly [1]. While the other logging systems are less explicity about it, they would all appear to benefit from being stopped. This commit updates all four LoggingSystems to stop/reset/clean up to underlying logging system when cleanUp is called. Closes gh-4026 [1] http://logback.qos.ch/manual/configuration.html#stopContext
-
Andy Wilkinson authored
See gh-2445
-
Phillip Webb authored
-
Andy Wilkinson authored
This commit adds auto-configuration support for WebSocket-based messaging. When the user enables WebSocket messaging (typically via @EnableWebSocket and @EnableWebSocketMessageBroker) and an ObjectMapper bean exists, a MappingJackson2MessageConverter that uses the ObjectMapper will be configured. This causes any spring.jackson.* configuration to affect WebSocket message conversion in the same way as it affects HTTP message conversion. Closes gh-2445
-
Andy Wilkinson authored
Closes gh-3808
-
Andy Wilkinson authored
The code that uses reflection to determine the protocol and port has been updated to align with changes made in Undertow 1.3 See gh-3969
-
Andy Wilkinson authored
Follow-on from c55900b4. Closes gh-3891
-
Andy Wilkinson authored
See gh-3969
-
Phillip Webb authored
Update TomcatEmbeddedServletContainerFactory to provide a better error message when attempting to load classpath resources. Fixes gh-2635
-
Phillip Webb authored
Update SpringApplicationContextLoader to detect xml and groovy configuration based on convention. Fixes gh-2516
-
- 28 Sep, 2015 7 commits
-
-
Phillip Webb authored
Update HealthMvcEndpoint so that relaxed names can be used as keys in the `endpoints.health.mapping` property. Fixes gh-2465
-
Phillip Webb authored
Update RemoteSpringApplication so that initializers and listeners are prescribed and not loaded from spring.factories. Fixes gh-3925
-
Phillip Webb authored
* gh-2371: Support `error.include-stacktrace` configuration
-
Michael Stummvoll authored
Add `error.include-stacktrace` configuration option to determine when stack trace attributes should be added. Options are `never`, `always` or `on-trace-param`. Prior to this commit stacktrace attributes were never includes in HTML responses, and only included in JSON responses when a `trace` request parameter was set to `true`. This has now been changed so that, by default, stacktrace attributes are never included. The BasicErrorController includes a protected method that can be overridden if includes should be different depending on the `produces` mapping. Closes gh-2371
-
Stephane Nicoll authored
-
Dave Syer authored
Fixes gh-3782
-
Dave Syer authored
-
- 26 Sep, 2015 8 commits
-
-
Phillip Webb authored
-
Phillip Webb authored
See gh-2064
-
Phillip Webb authored
Use SNAPSHOT build in preparation for 4.2.2. See gh-4020
-
Phillip Webb authored
Update MetricsFilter to use static `Pattern` instances for regex replacements rather than compiling them each time. Fixes gh-3996
-
Phillip Webb authored
See gh-2064
-
Phillip Webb authored
* gh-2214: Add Cassandra support
-
Julien Dubois authored
Add auto-configuration support and health checks for Cassandra and Spring Data Cassandra. Fixes gh-2064 Closes gh-2214
-
Phillip Webb authored
-
- 24 Sep, 2015 2 commits
-
-
Andy Wilkinson authored
This commit simplifies the Jackson-related auto-configuration that’s applied when Spring HATEOAS and Spring Data REST are on the classpath. Previously, Boot used Jackson2HalModule to apply the HAL-related ObjectMapper configuration to the context’s primary ObjectMapper. This was to allow HAL-formatted responses to be sent for requests accepted application/json (see gh-2147). This had the unwanted side-effect of polluting the primary ObjectMapper with HAL-specific functionality. Furthermore, Jackson2HalModule is an internal of Spring HATEOAS that @olivergierke has asked us to avoid using. This commit replaces the use of Jackson2HalModule with a new approach. Now, the message converters of any RequestMappingHandlerAdapter beans are examined and any TypeConstrainedMappingJackson2HttpMessageConverter instances are modified to support application/json in addition to their default support for application/hal+json. This behaviour can be disabled by setting spring.hateoas.use-hal-as-default-json-media-type to false. This property is named after Spring Data REST’s configuration option which has the same effect when using Spring Data REST. The new property replaces the old spring.hateoas.apply-to-primary-object-mapper property. Previously, when Spring Data REST was on the classpath, JacksonAutoConfiguration would be switched off resulting in the context containing multiple ObjectMappers, none of which was primary. This commit configures RepositoryRestMvcAutoConfiguration to run after JacksonAutoConfiguration. This gives the latter a chance to create its primary ObjectMapper before the former adds its ObjectMapper beans to the context. Previously, the actuator’s hypermedia support assumed that the HttpMessageConverters bean would contain every HttpMessageConverter being used by Spring MVC. When Spring HATEOAS is on the classpath this isn’t the case as it post-processes RequestMappingHandlerAdapter beans and adds a TypeConstrainedMappingJackson2HttpMessageConverter to them. This wasn’t a problem in the past as the primary ObjectMapper, used by a vanilla MappingJackson2HttpMessageConverter, was configured with Spring HATEOAS’sJackson2HalModule. Now that this pollution has been tidied up the assumption described above no longer holds true. MvcEndpointAdvice, which adds links to the actuator’s json responses, has been updated to look at the HttpMessageConverters of every RequestMappingHandlerAdapter when it’s trying to find a converter to use to write a response with additional hypermedia links. Integration tests have been added to spring-boot-actuator to ensure that the changes described above have not regressed the ability to configure its json output using spring.jackson.* properties (see gh-1729). Closes gh-3891
-
Phillip Webb authored
-