Commit Graph

5973 Commits (60a7880f62ea40180f7d06773369e17f2ede3a29)
 

Author SHA1 Message Date
Andy Wilkinson 0c2f281e89 Merge branch 'gh-4047' 9 years ago
Andy Wilkinson f86eed8646 Polish contribution 9 years ago
mackeprm 942da8bdd3 Support configuration of defaultValue and emptyStringIsFalse
This commit adds support for configuring defaultValue and
emptyStringIsFalse to MustacheCompilerFactoryBean.

Closes gh-4057
9 years ago
Phillip Webb 1e8017232b Merge branch 'gh-4018' 9 years ago
Phillip Webb d4c2959cee Document X-Forwarded-For support
Closes gh-4018
9 years ago
Phillip Webb 33ce160251 Automatically X-Forwarded-For in the cloud
Update `ServerProperties` to automatically enable `use-forward-headers`
when running on a cloud platform.

A new `CloudPlatform` enum has been introduced that detects Heroku and
Cloud Foundry.

See gh-4018
9 years ago
Phillip Webb 20b29db512 Unify ServerProperties X-Forwarded-For support
Add a new `server.use-forward-headers` property which can be used to
switch on X-Forwarded-For header support in all supported embedded
servlet containers.

This commit reverts the decision to enable `RemoteIpValve` with Tomcat
by default (gh-3782) and requires that either `user-forward-headers` is
set to true or that `server.tomcat.protocol-header` or
`server.tomcat.remote-ip-header` are set.

See gh-4018
See gh-3782
9 years ago
Phillip Webb c35105b868 Add X-Forwarded-For header support to Undertow
Add a `useForwardHeaders` property to allow embedded Undertow
containers to respect X-Forwarded-For headers.

Fixes gh-3881
9 years ago
Phillip Webb 7f97681969 Add X-Forwarded-For header support to Jetty
Add a `useForwardHeaders` property to allow embedded Jetty containers
to respect X-Forwarded-For headers.

Fixes gh-3802
9 years ago
Phillip Webb 50430a20c6 Add Tomcat X-Forwarded-For header tests
Update Abstract & Tomcat EmbeddedServletContainerFactoryTests to check
that X-Forwarded-For headers work as expected.

See gh-4018
9 years ago
Phillip Webb 5cbb81c64f Fix management security when using different port
Update ManagementWebSecurityAutoConfiguration to reinstate lazy creation
of EndpointHandlerMapping from the EndpointPathRequestMatcher.

Fixes a regression introduced in eb2984781 and picked up my one of the
sample integration tests.

Fixes gh-4059
9 years ago
Phillip Webb 7801a3879e Protect against missing spring-web.jar
See gh-4068
9 years ago
Phillip Webb 6be072ae07 Polish 9 years ago
Phillip Webb 0b36ba97b3 Polish order 9 years ago
Dave Syer 2169bbbc9b Check Environment matches webEnvironment after it is initialized
After the ApplicationEnvironmentPrepared we now check that the
webEnvironment flag and/or the Environment hasn't changed, in case
the user wanted to switch the context from a web to non-web in a
listener.

Fixes gh-2716
9 years ago
Stephane Nicoll 93d12494e5 Migrate Spring Data Rest settings
In order to have more control on the structure of the configuration, we
do not bind to `RepositoryRestConfiguration` directly anymore. This
commit introduces `RepositoryProperties` instead.

See gh-3854
Closes gh-4073
9 years ago
Andy Wilkinson 2964fd28a0 Polishing 9 years ago
Dave Syer 933aad3c06 Make checkstyle happier 9 years ago
Dave Syer c8021fa526 Comment out logback config 9 years ago
Dave Syer eb29847814 Hone the security rules for actuator endpoints
Takes into account the fact that the new /actuator endpoint sometimes
loses its path (it is "" relative to a non-empty management context path).

Fixes gh-4059
9 years ago
Dave Syer 15f22651f8 Add logging.pattern.level to config metadata 9 years ago
Stephane Nicoll 42c49b1c4f Merge pull request #4069 from izeye/polish-20151001
* pr/4069:
  Polish
9 years ago
izeye 5b211706c0 Polish
Closes gh-4069
9 years ago
Phillip Webb db0212b834 Allow spring-boot-devtools to work with JRebel
Update devtools to detect JRebel and disable application restarts. Other
features (such as LiveReload) can still be used.

Fixes gh-3095
9 years ago
Phillip Webb acde5407e8 Polish 9 years ago
Dave Syer cad2666522 Add support for LOG_LEVEL_PATTERN replacing the default level pattern
For logback we also support logging.pattern.level as a synonym.

Fixes gh-4062
9 years ago
Stephane Nicoll eeaa1df1dd Allow Mongo support without Spring Data MongoDB
Closes gh-4049
9 years ago
Stephane Nicoll b14756a7bb Improve git commit information for Gradle
Closes gh-3949
9 years ago
Stephane Nicoll 623fcfeff1 Properly guard cache statistics providers
Previously, a `NoClassDefFoundError` could be thrown if EhCache or Guava
is on the classpath without `spring-context-support` as the respective
cache statistics provider both needs the implementation and the spring
abstraction implementation.

The `@ConditionalOnClass` definition has been updated to properly guard
those beans.

Closes gh-3960
9 years ago
Andy Wilkinson 0d1729cb65 Fix Checkstyle warning 9 years ago
Andy Wilkinson 1f4dc77715 Improve error message when a non-directory is added to FileSystemWatcher
Previously, if a file or non-existent directory was added to
FileSystemWatcher, it would fail with the message “Folder must not be a
file”. While it suggests that the folder needs to be a directory, it
doesn’t make it clear that it also needs to exist. It also doesn’t
tell the user which folder caused the problem.

This commit updates the message to make it clear that the folder must
exist and must be a directory, and the include the name of the
problematic folder in the error message.

Closes gh-3918
9 years ago
Andy Wilkinson 968caf05b6 Merge branch 'gh-3977' 9 years ago
Andy Wilkinson 64bcba47a9 Polish contribution
- Add @author tag
 - Remove unnecessary final modifiers
 - Avoid writing to volatile field when new gauge is used

Closes gh-3977
9 years ago
Jay Anderson 3fb0ae3e3b Register dropwizard gauges once and then update them
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.
9 years ago
Andy Wilkinson ff5e4631e3 Add MockMvc-based integration tests for management.security.enabled
See gh-3997
9 years ago
Andy Wilkinson a76e84addc Restore LoggingSystems’ previous cleanup behaviour
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.
9 years ago
Stephane Nicoll e98aac4327 Polish d01bc41
Closes gh-2516
9 years ago
Stephane Nicoll 8a8c8272d2 Merge pull request #4054 from zhanhb/patch-2
* pr/4054:
  Fix typo
9 years ago
zhanhb b855a68bf4 Fix typo
Closes gh-4054
9 years ago
Phillip Webb 9681df0e9f Merge branch '1.2.x' 9 years ago
Phillip Webb 69d57f9a35 Polish 9 years ago
Phillip Webb b0d9a8322e Support `.` and `_` binder prefix joins
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
9 years ago
Andy Wilkinson e9878ebb5d Update tests to close the application contexts that they create
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
9 years ago
Andy Wilkinson 1bc1785db7 Return Logback to its default basic configuration after clean up
See gh-4026
9 years ago
Andy Wilkinson f7e8e1554c Shut down logging system as part of clean up processing
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
9 years ago
Andy Wilkinson 1e50d988ab Tighten up the conditions on WebSocketMessagingAutoConfiguration
See gh-2445
9 years ago
Phillip Webb fa040c9e26 Fix tests failing on Windows 9 years ago
Andy Wilkinson 204cb6f195 Auto-configure WebSocket JSON converter to use context’s ObjectMapper
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
9 years ago
Andy Wilkinson 2440e05cc4 Document startup script's support for JAVA_OPTS
Closes gh-3808
9 years ago
Andy Wilkinson d357533105 Upgrade to Undertow 1.3.0.CR2
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
9 years ago