Commit Graph

5876 Commits

Author SHA1 Message Date
Dave Syer
44c1348094 Fix DependencyResolutionContext for multiple boms
The problem was that it was not accumulating DependencyManagement
instances. It was throwing away the old ones and replacing with
only the latest.
2015-10-05 21:39:20 +01:00
Andy Wilkinson
60d508cda2 Fix FileSystemWatcherTests.sourceFolderMustExist on Windows 2015-10-05 17:32:07 +01:00
Andy Wilkinson
2292cff1ea Document the need to use spring.data.mongodb.uri with Mongo 3.0
Closes gh-4051
2015-10-05 15:22:26 +01:00
Andy Wilkinson
cff1eea4c4 Make new configuration inner class static
See gh-4079
2015-10-05 14:35:00 +01:00
Alexander Tokarev
91a40dd66c Disable unnecessary database initialization
If a DataSource class is found in the classpath then
EmbeddedDataSourceConfiguration will not be used, so the in-memory
database will not be shutdown on application context closing.
As a result, unnecessary database initialization may cause subsequent
tests to fail, for example see [1].

[1] https://github.com/spring-projects/spring-boot/issues/1712
2015-10-05 14:18:39 +01:00
Andy Wilkinson
bee7d24c1a Provide an example of using a .conf file with a truly executable jar
Closes gh-3522
2015-10-05 14:14:51 +01:00
Andy Wilkinson
a4eec42813 Ensure that new JPA-based test doesn’t accidentally enable Bitronix 2015-10-05 14:07:01 +01:00
Andy Wilkinson
d01236db30 Fix compile failure that doesn’t occur in Eclipse but does on Travis 2015-10-05 13:47:35 +01:00
Andy Wilkinson
fd53cbf2f3 Stop JPA and a custom Flyway bean from causing a startup failure
Previously, if an application used JPA and declared its own Flyway bean,
startup would fail. The custom Flyway bean would switch off
auto-configuration of the FlywayMigrationInitializer bean but the
context’s entity manager factory beans would still be configured to
depend on the migration initialiser.

This commit splits the post-processor that configures the dependencies
into two. One that configures the dependency on the Flyway bean and
one that configures the dependency on the FlywayMigrationInitializer
bean. When to auto-configuration of the FlywayMigrationInitializer is
switched off, the auto-configuration of the latter dependency is also
switched off.

Closes gh-4079
2015-10-05 13:36:20 +01:00
Andy Wilkinson
81f6a77d15 Update starters to only depend on AspectJ Weaver
AspectJ’s weaver module contains a superset of the classes found in
AspectJ’s RT module. This commit updates the starters to exclude
aspectjrt so that only aspectjweaver is on the classpath.

Closes gh-3975
2015-10-05 12:41:17 +01:00
Andy Wilkinson
b85756a0de Upgrade to Reactor and Reactor Spring 2.0.6.RELEASE
Closes gh-4003
2015-10-05 12:24:33 +01:00
Andy Wilkinson
917077c3dd Merge branch '1.2.x' 2015-10-05 11:41:30 +01:00
Andy Wilkinson
a94f3a0cbf Only try to auto-configure Jetty when jetty-webapp is on the classpath
Closes gh-4089
2015-10-05 11:41:23 +01:00
Andy Wilkinson
26324f68b9 Make system props available when building model for CLI dep mgmt bom
Certain Maven profile activator’s require access to System properties
to determine whether or not a profile should be activated.
JdkVersionProfileActivator is one such activator.

Prior to this commit, the presence of a Maven profile that was activated
based on the JDK in a bom imported using @DependencyManagementBom in the
CLI would trigger a failure as the JdkVersionProfileActivator could not
determine the version of Java on which it was running.

This commit updates the CLI to pass the JVM’s System properties to the
request to build a bom’s model so that those system properties can be
used by JdkVersionProfileActivator (and any other activators which need
them).
2015-10-05 11:33:04 +01:00
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