Commit Graph

6012 Commits

Author SHA1 Message Date
Thomas Raehalme 3865f3b303 Allow launch script to be used by accounts that use /sbin/nologin
Closes gh-3852
Closes gh-3906
2015-10-05 11:08:52 +01:00
Andy Wilkinson 5c35d89fd1 Revert "Update tests to shut down in-memory databases proactively"
For reasons I don't (yet?) understand, shutting down the databases
proactively triggers a StackOverflowError in Jersey. Reverting the
change while I try to figure out what's going in.
2015-10-05 11:07:47 +01:00
Andy Wilkinson 72122ec965 Update tests to shut down in-memory databases proactively 2015-10-05 10:15:49 +01:00
Dave Syer ddbbd37718 Change order of bom transformation to allow others earlier 2015-10-05 09:54:58 +01:00
Stephane Nicoll cec4a8ec19 Merge pull request #4083 from ApiSecRay/master
* pr/4083:
  Fix typos
2015-10-03 11:52:53 +02:00
Ray Sinnema 5dc2290608 Fix typos
Closes gh-4083
2015-10-03 11:51:55 +02:00
Dave Syer 3e7b335e04 Upgrade to Spring AMQP 1.5.1 2015-10-03 09:56:31 +01:00
Stephane Nicoll 7d182028af Remove unecessary modifier 2015-10-03 09:11:32 +02:00
Stephane Nicoll 2beae9ad2a Merge pull request #4087 from izeye/polish-20151003
* pr/4087:
  Polish
2015-10-03 08:53:34 +02:00
izeye a13b23e7f8 Polish
Closes gh-4087
2015-10-03 08:53:19 +02:00
Phillip Webb 4ffcd3a22c Log active profiles on SpringApplication.run
Fixes gh-3766
2015-10-02 16:08:03 -07:00
Phillip Webb d1b936ef2c Merge branch '1.2.x' 2015-10-02 15:44:25 -07:00
Phillip Webb 87a515f6a0 Fix TemplateAvailabilityProvider binding issues
Update all TemplateAvailabilityProvider implementations to use the
relaxed property binder. Also fix FreeMarkerTemplateAvailabilityProvider
to use `template-loader-path` rather than `path`.

Fixes gh-4085
2015-10-02 15:39:43 -07:00
Phillip Webb 5e58645202 Log warning for template folder not found problems
Update template auto-configurations to log a warning message rather
than throw an exception if the template folder cannot be found.

Fixes gh-4075
2015-10-02 15:37:39 -07:00
Phillip Webb 5ccd9afc78 Merge branch '1.2.x' 2015-10-02 15:08:25 -07:00
Phillip Webb 891faa9d35 Fix test cleanup to reset commons logging 2015-10-02 15:04:04 -07:00
Andy Wilkinson fac42adb61 Use the right version of ClassUtils 2015-10-02 21:13:52 +01:00
Phillip Webb 2f694fa406 Add per-line match indicators to a/c report
Update the logged auto-configuration report so that each line includes
"matched", "did not match" text. This helps when looking to see if a
specific auto-configuration class was applied or not.

Fixes gh-4084
2015-10-02 13:09:31 -07:00
Andy Wilkinson eae7b0364b Replace use of deprecated JdkVersion API by looking for presence of classes
This commit updates ConditionalOnJava to remove a dependency on the
deprecated JdkVersion API from Spring Framework. In its place it now
looks for the presence of certain classes to determine the version of
Java on which its running.

Closes gh-4005
2015-10-02 19:55:38 +01:00
Phillip Webb 6a31c1dda1 Include debug message on management context fail
Update EndpointWebMvcAutoConfiguration to log exception details at DEBUG
in addition to the WARNING message when the child context fails to
start.

See gh-4064
2015-10-02 11:44:41 -07:00
Phillip Webb e272b3a957 Introduce AbstractEndpointMvcAdapter
Pull up functionality from EndpointMvcAdapter to a new
AbstractEndpointMvcAdapter which doesn't define any @RequestMappings and
update HealthMvcEndpoint to make use of it.
2015-10-02 11:26:03 -07:00
Phillip Webb c3b7764b72 Polish 2015-10-02 11:25:56 -07:00
Gary Russell 48ba1d888f Update Spring AMQP to 1.4.6 2015-10-02 13:04:26 -04:00
Phillip Webb fe8e8df701 Fix failing LocalDevToolsAutoConfigurationTests
Looks like a file was missed from the commit.

See gh-3851
2015-10-02 09:44:59 -07:00
Andy Wilkinson 3553e1d825 Merge branch '1.2.x'
Conflicts:
	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java
2015-10-02 16:57:21 +01:00
Andy Wilkinson 2b748a7b44 Fix SampleOAuth2SsoApplicationTests
The redirect happens in two stages, first from / to /login on localhost
and then to github.com. This commit updates the test to check that the
first redirect has worked, i.e. from / to /login on localhost.
2015-10-02 16:55:00 +01:00
Andy Wilkinson 315e63b017 Allow default DevTools properties to be overridden
Previously the default DevTools property source was added in first place
to the environment’s property sources in an unordered environment
post-processor. This made it difficult to override them.

This commit updates the post-processor to be ordered with lowest
precedence and to add the property source in last place. This should
allow any other property sources and to override the defaults.

Closes gh-3851
2015-10-02 16:38:45 +01:00
Stephane Nicoll 19b5e59234 Use spring.velocity.charset for template encoding
Previously `spring.velocity.charset` only controlled the output encoding
with the templates being loaded with the default encoding. We now
consistently set the same value for both the input and output encodings.

It is still possible to override it to a different value using
`spring.velocity.properties.input.encoding`

Closes gh-3994
2015-10-02 16:22:08 +02:00
Stephane Nicoll 8978f54cc3 Use spring.velocity.charset for template encoding
Previously `spring.velocity.charset` only controlled the output encoding
with the templates being loaded with the default encoding. We now
consistently set the same value for both the input and output encodings.

It is still possible to override it to a different value using
`spring.velocity.properties.input.encoding`

Closes gh-3994
2015-10-02 16:12:42 +02:00
Dave Syer e232e7c837 Add warning about export of metrics being switched off
E.g. just adding Dropwizard to the classpath switches it off which
might be surprising. We need a @ExportMetricReader to do the export.
2015-10-02 14:51:50 +01:00
Dave Syer 57d9b58f79 Fix rule about whitespace in Collections.<String>emptyList() 2015-10-02 14:26:54 +01:00
Dave Syer 67a70571de Add simple SSO sample with github authentication 2015-10-02 14:13:15 +01:00
Andy Wilkinson 10fbae8fb6 Avoid leaking application context shutdown hooks in the tests
Closes gh-4053
2015-10-02 13:33:01 +01:00
Stephane Nicoll c6040e42a8 Fix typo 2015-10-02 14:06:10 +02:00
Stephane Nicoll b2c3e7e2ed Rename error.* properties to server.error.*
Closes gh-4050
2015-10-02 14:03:24 +02:00
Dave Syer 4b1389179d Attempt to fix test failures caused by ordering issues 2015-10-02 10:52:03 +01:00
Dave Syer e1070cce07 Check authorities of user in HealthMvcEndpoint
We need to be a bit cautious about whether Spring Security is on
the classpath or not, but if it is we can test for the admin role
(as specified in `management.security.role`).

Fixes gh-4060
2015-10-02 10:42:43 +01:00
Dave Syer 972557851a All MVC endpoint paths to be separately customized from the id
This change applies only to "standard" MVC endpoints (not the extended
ones like /env and /jolokia which already have this feature). Allows
users to supply an endpoints.{name}.path.

Fixes gh-2790
2015-10-02 10:42:43 +01:00
Andy Wilkinson 434d46f583 Add support for using RemoteSpringApplication behind a proxy
This commit adds two new properties, spring.devtools.remote.proxy.host
and spring.devtools.remote.proxy.port that can be used to configure
RemoteSpringApplication to connect to the remote application through
an HTTP proxy.

Closes gh-3968
2015-10-02 10:37:32 +01:00
Andy Wilkinson 0c2f281e89 Merge branch 'gh-4047' 2015-10-02 09:13:28 +01:00
Andy Wilkinson f86eed8646 Polish contribution 2015-10-02 09:03:26 +01:00
mackeprm 942da8bdd3 Support configuration of defaultValue and emptyStringIsFalse
This commit adds support for configuring defaultValue and
emptyStringIsFalse to MustacheCompilerFactoryBean.

Closes gh-4057
2015-10-02 08:57:43 +01:00
Phillip Webb 1e8017232b Merge branch 'gh-4018' 2015-10-02 00:01:22 -07:00
Phillip Webb d4c2959cee Document X-Forwarded-For support
Closes gh-4018
2015-10-02 00:00:22 -07:00
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
2015-10-02 00:00:14 -07:00
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
2015-10-01 23:59:59 -07:00
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
2015-10-01 23:59:48 -07:00
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
2015-10-01 23:59:33 -07:00
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
2015-10-01 23:59:12 -07:00
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
2015-10-01 18:06:43 -07:00