Commit Graph

7385 Commits

Author SHA1 Message Date
Andy Wilkinson
232a808049 Merge pull request #5572 from Quinten De Swaef
* gh-5572:
  Polish contribution
  Allow Tomcat's minimum threads to be configured via the environment
2016-04-05 11:03:18 +01:00
Andy Wilkinson
487f7310fd Polish contribution 2016-04-05 11:03:03 +01:00
Quinten De Swaef
34eb3695e4 Allow Tomcat's minimum threads to be configured via the environment
Closes gh-5572
2016-04-05 10:56:11 +01:00
Andy Wilkinson
ca716561dc Update deployment test exclusions after web starter validation changes
The changes made in a6c1668b mean that the web starter no longer
depends on spring-boot-starter-validation. Instead, it depends
directly on hibernate-validator. This means that the exclusion of the
validation starter in the TomEE deployment test app no longer matches
anything and hibernate-validator is packaged in the war. This breaks
the application as TomEE ships with Bean Validation 2.0 and the
version of Hibernate Validator being used requires 2.1.

This commit updates the exclusions in the TomEE deployment app so that
hibernate-validator is excluded once again. This allows the app to
use TomEE's bundled Bean Validation implementation.

The stale spring-boot-starter-validation exclusion has been removed
from the Wildfly deployment test app. It is redundant as Wildfly ships
with Bean Validation 2.1. This brings this test app into line with
the Glassfish test app.

Closes gh-5454
2016-04-05 09:20:20 +01:00
Stephane Nicoll
539d57551c Merge pull request #5570 from stepio/master
* pr/5570:
  Manage jackson-module-jaxb-annotations dependency
2016-04-05 07:53:37 +02:00
Igor Stepanov
01f3e7059b Manage jackson-module-jaxb-annotations dependency
Closes gh-5570
2016-04-05 07:52:24 +02:00
Phillip Webb
5479c4cd6e Merge pull request #5565 from izeye/patch-3
* patch-3:
  Remove System.out.println()
2016-04-04 22:37:49 -07:00
Johnny Lim
8864f85b82 Remove System.out.println() 2016-04-04 22:37:37 -07:00
Phillip Webb
b398b3319c Rename @SpringApplicationTest -> @SpringBootTest
Rename @SpringApplicationTest to SpringBootTest and
@SpringApplicationContextLoader to @SpringBootContextLoader.

Fixes gh-5562
2016-04-04 22:36:58 -07:00
Phillip Webb
b0b190b362 Delete @SpringApplicationConfiguration
Remove the @SpringApplicationConfiguration annotation since it offers
little value over @SpringApplicationTest.

See gh-5562
2016-04-04 22:36:58 -07:00
Phillip Webb
4d404b214c Migrate away from @SpringApplicationConfiguration
Refactor internal tests to no longer use @SpringApplicationConfiguration

See gh-5562
2016-04-04 22:36:57 -07:00
Phillip Webb
adb42ed966 Polish 2016-04-04 22:36:57 -07:00
Andy Wilkinson
15cbef3df0 Update JpaBaseConfiguration to use constructor injection
This change was missed as part of the work done in 19d8c5e6.

See gh-5306
Closes gh-5543
2016-04-04 18:55:31 +01:00
Andy Wilkinson
e41ccfae3c Correct javadoc tag 2016-04-04 17:47:05 +01:00
Andy Wilkinson
eb3180d581 Provide test auto-configuration for Spring REST Docs
This commit introduces a new annotation, @AutoConfigureRestDocs,
which can be used to enable auto-configuration of Spring REST Docs.
The auto-configuration removes the need to use Spring REST Docs' JUnit
rule and will automatically configure MockMvc. Combined with the new
auto-configuration for MockMvc it allows a test class to be free of
boilerplate configuration:

@RunWith(SpringRunner.class)
@WebMvcTest
@AutoConfigureRestDocs(outputDir = "target/generated-snippets",
        uriScheme = "https", uriHost = "api.example.com",
        uriPort = 443)
public class ExampleDocumentationTests {

    @Autowired
    private MockMvc mvc;

    @Test
    public void documentIndex() {
        // …
    }

}

For more advanced customization a RestDocsMockMvcConfigurationCustomizer
bean can be used.

If a RestDocumentationResultHandler is found in the context, it will
be passed to the ConfigurableMockMvcBuilder's alwaysDo method as part
of its customization.

Closes gh-5563
2016-04-04 17:19:51 +01:00
Andy Wilkinson
f99bfccd51 Polishing 2016-04-04 13:43:27 +01:00
Andy Wilkinson
b630b080ce Make it easier to customize the auto-configured MockMvcBuilder
Closes gh-5556
2016-04-04 13:40:22 +01:00
Andy Wilkinson
611d441763 Polishing 2016-04-04 13:25:02 +01:00
Dave Syer
416ce1a6f4 Make FixedAuthoritiesExtractor more liberal in what it accepts
In particular it now accepts a list of maps containing
"authority" keys (which is what you get from a standard JSON
decoding of a Spring Security Authentication).

Fixes gh-5482
2016-04-04 12:20:39 +01:00
Dave Syer
a6c1668bd9 Switch validator starter for hibernate validator
In the web starter we shouldn't depend explicitly on any EL
implementation, otherwise when people build wars and deploy
them in containers that have their own EL there is a conflict.
We can still depend on hibernate-validator to support
JSR-303 in web apps because the EL implementation comes with
the container.

Fixes gh-5454
2016-04-04 11:53:40 +01:00
Dave Syer
72db5becd6 Add comment to pom in sample explaining provided deps 2016-04-04 11:08:08 +01:00
Stephane Nicoll
be987065b1 Merge pull request #5557 from brendankirby/readme-patch
* pr/5557:
  Update README.adoc
2016-04-03 10:42:05 +02:00
Brendan Kirby
6de4cabc29 Update README.adoc
Closes gh-5557
2016-04-03 10:41:45 +02:00
Stephane Nicoll
0a8975bc84 Polish 2016-04-02 08:05:02 +02:00
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