Commit Graph

7761 Commits

Author SHA1 Message Date
Phillip Webb 34070e5a8e Add Support for Mockito spies
Add a @SpyBean annotation that can be used to create spies.

Fixes gh-5538
2016-04-01 17:16:40 -07:00
Stephane Nicoll 1d4f38e440 Merge pull request #5553 from izeye/polish-20160401
* pr/5553:
  Polish
2016-04-01 17:11:33 +02:00
Johnny Lim f88c583570 Polish
Closes gh-5553
2016-04-01 17:11:17 +02:00
Andy Wilkinson 27b0666fe3 Merge pull request #5406 from Kazuki Shimizu
* gh-5406:
  Upgrade to Lombok 1.16.8
2016-04-01 11:56:42 +01:00
Kazuki Shimizu db015a6c05 Upgrade to Lombok 1.16.8
Closes gh-5406
2016-04-01 11:56:21 +01:00
Andy Wilkinson f55066464d Merge branch '1.3.x' 2016-04-01 11:53:35 +01:00
Andy Wilkinson dad4e84d35 Merge pull request #5410 from Kazuki Shimizu
* version-upgrades:
  Upgrade to Logback 1.1.6
2016-04-01 11:43:25 +01:00
Kazuki Shimizu b4b7e7ead3 Upgrade to Logback 1.1.6
Closes gh-5410
2016-04-01 11:42:50 +01:00
Andy Wilkinson e7bb67fa33 Upgrade to SLF4J 1.7.20
Closes gh-5408
2016-04-01 11:42:07 +01:00
Phillip Webb c167e4fd0e Rework SpringApplicationTest documentation
Closes gh-5477
2016-03-31 21:37:28 -07:00
Andy Wilkinson 33f0ea3480 Rework SpringApplicationTest to support web modes
Rework the new testing support so that @SpringApplicationTest can be
used for standard integration tests, web integration tests with a
mock Servlet environment and web integration tests with an embedded
servlet container. This means that it a replacement for 1.3's
@IntegrationTest and @WebIntegrationTest and allows all
SpringApplication testing to be configured using a common annotation.

The old @IntegrationTest and @WebIntegrationTest along with their
supporting classes have been reinstated to their previous form (while
remaining deprecated). This should ensure that they continue to work
in 1.4 exactly as they did in 1.3 giving users a smooth path to
@SpringApplicationTest.

See gh-5477
2016-03-31 21:35:10 -07:00
Phillip Webb 893a6c32f3 Upgrade to checkstyle 6.17
Fixes gh-5547
2016-03-31 13:14:53 -07:00
Andy Wilkinson 4f200a852b Add missing jar file
It should have been in 68b83a8f but was excluded by gitignore.

See gh-3701
2016-03-31 13:16:55 +01:00
Andy Wilkinson 68b83a8f00 Improve handling of loader.path in PropertiesLauncher
Previously, if loader.path directly specified a jar file that contained
nested archives (.zip or .jar), launching would fail unless those
nested archives were uncompressed. However, if loader.path specified a
directory that contained such a jar file the launch would succeed. This
was because the nested archives within the jar were ignored.

This commit updates PropertiesLauncher so that its behaviour in the
scenarios described above is consistent by not looking for archives
nested with a jar that’s be specified on loader.path. The javadoc for
loader.path has also been updated to make it clear that loader.path
can points to directories or jar files, bringing it into line with
the reference guide.

Closes gh-3701
2016-03-31 10:33:03 +01:00
Andy Wilkinson 313b6f6451 Simplify exception handling and reporting in the launcher
Following changes to LaunchedURLClassLoader made in 87fe0b2a, it is
no longer necessary for the launcher to load MainMethodRunner via
reflection as both the app class loader that the launcher URL class
loader share the same MainMethodRunner class.

This commit takes advantage of this by updating Launcher to instantiate
MainMethodRunner directly rather than via reflection, removing one
source of possible exceptions in the launcher.

As the MainMethodRunner is now loaded directly and its class is shared
between the two class loaders, there’s no longer a need for it to
implement Runnable. This allows it to throw Exception from its run
method, rather than having to wrap any Exception in a RuntimeException.

Lastly, rather than catching any exception thrown from the launch,
Launcher and its subclasses have been updated to allow this exception
to be thrown from the main method. This allows the Exception to reach
the JVM, to be processed by our registered uncaught exception handler,
and to trigger the JVM’s standard processing for exiting due to a
failure. This removes the need for the Launcher itself to call
System.exit(1) and ensures that the exception is only output to the
console if it hasn’t been registered as a logged exception.

Closes gh-5358
2016-03-31 09:42:11 +01:00
Andy Wilkinson 491ab3dd31 Fix assembly that collects all of the starter poms
Closes gh-5267
2016-03-30 15:09:56 +01:00
Andy Wilkinson fec53970f7 Auto-generate tables describing the first-party starters
Previously, the documentation included hand-written tables for the
application, production, and technical starters.

This commit replaces the hand-written tables with tables that are
generated automatically from all of the starter poms, thereby ensuring
that the documentation is automatically kept up-to-date as starters
are added and removed. An extra column provided a link to each
starter's pom on GitHub has also been added to the table. This makes
it easier for users to see exactly what each starter contains.

Closes gh-5267
2016-03-30 14:42:38 +01:00
Stephane Nicoll 2b649542e0 Merge pull request #5532 from izeye/polish-20160330
* pr/5532:
  Polish
2016-03-30 08:43:39 +02:00
Johnny Lim a28dd9d9e6 Polish
Closes gh-5532
2016-03-30 08:43:23 +02:00
Phillip Webb 39140945b5 Polish 2016-03-29 21:45:11 -07:00
Phillip Webb 8a11620052 Fix failing test due to SPR-14093 2016-03-29 20:56:56 -07:00
Phil Webb 091245052f Update PULL_REQUEST_TEMPLATE.md 2016-03-29 17:08:17 -07:00
Stephane Nicoll 6dd84159f5 Restore JMX property to IntegrationJmxConfiguration
Closes gh-5309
2016-03-29 15:26:38 +02:00
Stephane Nicoll 00ae6ff9e2 Merge pull request #5488 from garyrussell/amqp-update
* pr/5488:
  Upgrade Spring AMQP to 1.6.0.M2
2016-03-29 15:18:12 +02:00
Gary Russell 701561eede Upgrade Spring AMQP to 1.6.0.M2
Closes gh-5488
2016-03-29 15:12:39 +02:00
Stephane Nicoll 0e46fc060c Merge pull request #5521 from eddumelendez/gh-5447
* pr/5521:
  Polish contribution
  Add `defaultValue` property in springProperty tag
2016-03-29 15:11:08 +02:00
Stephane Nicoll a66045fa98 Polish contribution
Closes gh-5521
2016-03-29 15:10:50 +02:00
Eddú Meléndez c86284cea3 Add `defaultValue` property in springProperty tag
This commit adds a `defaultValue` attribute to the `springProperty` tag
of Logback. That attribute can be used to specify a default value.

Closes gh-5447
2016-03-29 14:45:05 +02:00
Stephane Nicoll 54bea72554 Polish Jersey integration tests 2016-03-29 14:36:52 +02:00
Stephane Nicoll c752fac5c0 Expose load-on-startup for Jersey
This commit adds a `spring.jersey.filter.load-on-startup` property used to
customize the startup priority of the Jersey servlet.

Closes gh-5100
2016-03-29 14:18:18 +02:00
Stephane Nicoll 928f2dfc91 Sanitize keys with 'token' by default
This commit updates `Sanitizer` to sanitize by default a key containing
`token`.

Closes gh-5462
2016-03-29 13:28:13 +02:00
Stephane Nicoll 0c1dd1aac5 Merge pull request #5512 from rob-baily/issues-5465
* pr/5512:
  Polish contribution
  Add check for non empty list of factories
2016-03-29 13:05:56 +02:00
Stephane Nicoll 33967927db Polish contribution
Closes gh-5512
2016-03-29 13:04:28 +02:00
Rob Baily 971a7194d8 Add check for non empty list of factories
It was seeen that if a different plugin was used to package Spring Boot
that the project would load but no autoconfiguration actually took
place and many features were mysteriously not working.  Adding a check
to ensure that some factories are always loaded as this is expected.

Closes gh-5465
2016-03-29 12:58:16 +02:00
Stephane Nicoll 1b8f44ae2a Merge pull request #5498 from eddumelendez/gh-5483
* pr/5498:
  Polish contribution
  Add useAlwaysMessageFormat configuration key
2016-03-29 12:55:42 +02:00
Stephane Nicoll 1e0873c86e Polish contribution
Closes gh-5498
2016-03-29 12:55:35 +02:00
Eddú Meléndez 4912b989a5 Add useAlwaysMessageFormat configuration key
Allow to configure the `useAlwaysMessageFormat` attribute of
`MessageSource` via configuration.

Closes gh-5483
2016-03-29 12:50:39 +02:00
Andy Wilkinson 7db9280bf3 Rename the default BuildInfo task to bootBuildInfo
Previously, the default BuildInfo task created by the DSL was called
buildInfo. Due to Gradle's lack of namespacing for tasks, this meant
there was a slight risk that it could clash with another task. It
also didn't following the naming used by Boot's run task which is
named bootRun.

This commit renames the default BuildInfo task to bootBuildInfo to
match bootRun and to hopefully avoid clashes with tasks from other
plugins.

Closes gh-5518
2016-03-29 11:35:38 +01:00
Andy Wilkinson fc463afb89 Merge branch '1.3.x' 2016-03-29 11:16:16 +01:00
Andy Wilkinson 1043239de0 Ignore non-JavaExec run task when finding application's main class
Previously, FindMainClassTask would look for a property named main
on any class named run. This was based on the assumption that the
run task would be a JavaExec task (typically provided by the
application plugin). If the run task was not a JavaExec task (more
accurately, if it did not have a main property) this would result in
a build failure due to trying to read a non-existent property.

This commit updates FindMainClassTask to only use the main property
of the run task if the task is a JavaExec task. This guarantees that
the property will exist on the task, and unlike using any property
named main on a task named run, also guarantee that its value will
refer to a Java class with a main method.

Closes gh-5501
2016-03-29 11:03:47 +01:00
Stephane Nicoll abd86e50e0 Merge branch '1.3.x' 2016-03-29 11:30:28 +02:00
Stephane Nicoll ae095b2c1b Disable JMX Integration support if necessary
This commit fixes `IntegrationAutoConfiguration` to actually rely on the
auto-configured `MBeanServer` rather than attempting to create it again.

If JMX support is disabled, no attempt to register integration-related
MBeans is made.

Closes gh-5309
2016-03-29 11:27:24 +02:00
Stephane Nicoll 87b963b396 Merge branch '1.3.x' 2016-03-29 10:57:02 +02:00
Stephane Nicoll 3363415712 Polish documentation
Add a reference ot underscore notation

Closes gh-5268
2016-03-29 10:56:46 +02:00
Stephane Nicoll f7ffb017ad Relocate static asset
Closes gh-5504
2016-03-29 09:34:27 +02:00
Stephane Nicoll 6bc6cec1dc Merge pull request #5514 from oembedler/master
* pr/5514:
  Add graphql-spring-boot-starter reference
2016-03-29 09:15:12 +02:00
oEmbedler Inc 9cb6414821 Add graphql-spring-boot-starter reference
Closes gh-5514
2016-03-29 09:12:14 +02:00
Phillip Webb 8783f75d03 Add GitHub Issue and PR templates 2016-03-28 17:04:52 -07:00
Phillip Webb 07313d1245 Merge branch '1.3.x' 2016-03-28 12:52:49 -07:00
Phillip Webb 0a7a283f45 Apply logging system properties on reinitialize
Restore Spring Boot 1.3.2 behavior of re-applying system properties
when SLF4J based loggers are re-initialized. Reapplying system
properties is required when using the Spring Cloud config server since
PropertySourceBootstrapConfiguration directly calls the system
initialize method.

Fixes gh-5491
2016-03-28 12:49:05 -07:00