Commit Graph

991 Commits

Author SHA1 Message Date
Phillip Webb 97d7ffd8e8 Merge branch '1.4.x' into 1.5.x 2016-12-28 14:48:05 -08:00
Phillip Webb 61c931943f Fix Devtools PatternResolver Servlet support
Update ClassLoaderFilesResourcePatternResolver to support servlet
resources when it's being used with a WebApplicationContext.

Prior to commit 918e122ddc a `ResourceLoader` was not added to the
`ApplicationContext`, meaning that servlet resources could be found by
virtue of the protected `getResourceByPath()` method. Following commit
918e122ddc, the context `ResourceLoader` is set, meaning that all calls
to `getResource` delegate to the `ResourceLoader` and the
`ApplicationContext` methods are not invoked. Since the devtools
`ResourceLoader` wasn't Servlet aware, servlet resources could not
be found.

Fixes gh-7752
2016-12-28 14:25:11 -08:00
Phillip Webb 85504e74a6 Merge branch '1.4.x' into 1.5.x 2016-12-27 15:05:15 -08:00
Mesut Can Gurle ab2290eecd Improve Cassandra sample README documentation
Update the README file in `spring-boot-sample-data-cassandra` with
details of how to setup the keyspace and create the tables.

Closes gh-7737
2016-12-27 12:56:22 -08:00
Phillip Webb 61f65ea10e Add test for devtools + serving from `/public`
Add a simple test to show that basic serving of `/public` resources
works with devtoos.

See gh-7752
2016-12-27 12:24:32 -08:00
Phillip Webb a116579cfc Work around Jetty websocket client bug
Add workaround for Jetty JsrSession NullPointerException bug
(https://github.com/eclipse/jetty.project/issues/1202) in
`spring-boot-sample-websocket-jetty`.

See gh-7599
2016-12-24 11:22:58 -08:00
Phillip Webb a23591e047 Support Jetty 9.4 and upgrade to 9.4.0.v20161208
Update `JettyEmbeddedServletContainerFactory` to support Jetty 9.4
directly and Jetty 9.3 via reflection. The primary difference between
Jetty 9.3 and 9.4 are the session management classes. Websocket suppport
has also been updates, but this is handled transparently by the
Spring Framework support.

Fixes gh-7599
2016-12-24 11:22:38 -08:00
Phillip Webb c3edf9e341 Fixup version numbers following release 2016-12-22 19:03:09 -08:00
Spring Buildmaster 9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Phillip Webb 982f41b70c Polish @IntegrationComponentScan auto-configuration
See gh-2037
See gh-7718
2016-12-21 22:22:50 -08:00
Stephane Nicoll ac9eb8a9a9 Fix Maven warning in samples
Closes gh-7716
2016-12-21 11:40:14 +01:00
Phillip Webb 6121208cbb Polish formatting 2016-12-19 12:47:03 -08:00
Phillip Webb bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Madhura Bhave 1be5812cf0 Require `ACTUATOR` role rather than `ADMIN`
Update management security to require an `ACTUATOR` role rather than
`ADMIN` by default. This should reduce the risk of users accidentally
exposing actuator endpoints because they happen to use a role named
`ADMIN`.

Fixes gh-7569
2016-12-05 17:58:16 -08:00
Madhura Bhave d09aafacda Add a security interceptor for actuator endpoints
Update `AbstractEndpointHandlerMapping` to support a security
interceptor that can be used to enforce endpoint security.

Fixes gh-6889
2016-12-05 17:57:00 -08:00
Andy Wilkinson cee2f818d6 Fix m2e error caused by spring-boot-sample-custom-layout 2016-12-02 11:20:39 +00:00
Stephane Nicoll 740d28578b Promote plugin dependency management
This commit promotes the plugin dependency management for the
`maven-enforcer-plugin` and `maven-invoker-plugin` to the root. That way
these can be used in samples as well rather than having a separate copy.

Closes gh-7517
2016-11-30 11:37:48 +01:00
Stephane Nicoll b618c70e52 Add test slice for pure jdbc tests
This commit adds `@JdbcTest`, a new test slice for pure jdbc tests. It
provides the same basic features than `@DataJpaTest`.

Closes gh-6563
2016-11-29 14:54:15 +01:00
Stephane Nicoll 140379fc5a Fix Maven warnings 2016-11-29 10:03:49 +01:00
Stephane Nicoll cb6a7b79fe Fix build failure 2016-11-29 10:03:30 +01:00
Phillip Webb 8432c52369 Add custom LayoutFactory sample
Add a sample that shows how a custom LayoutFactory can be used with
both Maven and Gradle.

Closes gh-7263
2016-11-28 16:31:53 -08:00
Phillip Webb 88c84ce234 Merge branch '1.4.x' into 1.5.x 2016-11-22 14:53:30 -08:00
Phillip Webb ce58e16860 Add additional Tomcat timeout test
Update the Tomcat sample to also test that the connection timeout is
set.

See gh-7425
2016-11-22 14:30:36 -08:00
Andy Wilkinson f5dd90815b Polishing: fix some compiler warnings 2016-11-22 11:07:51 +00:00
Phillip Webb 1657120286 Move ModifiedClassPathRunner to its own module
Migrate `ModifiedClassPathRunner` from `spring-boot` test source to
its own module.

Fixes gh-7420
2016-11-18 17:27:54 -08:00
Johnny Lim 8038882d46 Polish
Closes gh-7403
2016-11-16 13:36:51 -08:00
Stephane Nicoll 2b8801a6b5 Merge branch '1.4.x' into 1.5.x 2016-11-12 11:16:30 +01:00
Emanuel Rabina 6b681ddfab Upgrade Thymeleaf 3 layout dialect in doc
Closes gh-7370
2016-11-12 11:15:00 +01:00
Stephane Nicoll 72e696bcbd Fixup version numbers following release 2016-11-08 18:24:42 +01:00
Spring Buildmaster e712a9ba8c Next Development Version 2016-11-08 16:55:37 +00:00
Stephane Nicoll 01e66ecbd5 Merge branch '1.4.x' into 1.5.x 2016-11-05 11:15:27 +01:00
Stephane Nicoll 4311cf333f Remove sample reference in build 2016-11-05 11:14:50 +01:00
Stephane Nicoll 4407194c00 Replace sample by integration test
Closes gh-3888
2016-11-05 11:09:36 +01:00
Andy Wilkinson 025bafd911 Polish new Actuator sample 2016-11-03 22:40:12 +00:00
Phillip Webb 81c5753f4d Merge branch '1.4.x' into 1.5.x 2016-11-03 14:49:38 -07:00
Phillip Webb 6a2ac080ac Create our own SessionCreationPolicy enum
Update `ManagementServerProperties` so that `security.sessions` no
longer uses `SessionCreationPolicy` from Spring Security. We now
use our own enun which allows `management.security.*` properties to
be set without the risk of a `ClassNotFoundException`.

Fixes gh-3888
2016-11-03 14:36:49 -07:00
Andy Wilkinson 7962818294 Merge branch '1.4.x' into 1.5.x 2016-10-19 10:44:20 +01:00
Andy Wilkinson 6ac041c43b Update Thymeleaf 3 related versions in docs and sample
See gh-6991
Closes gh-7183
2016-10-19 10:43:38 +01:00
Andy Wilkinson 57108a9faa Try to make the tests for the Cassandra sample more robust
Cassandra sometimes takes a long time when dropping the test keyspace.
This results in the test failing due to an exception being thrown.
This commit attempts to make the tests more robust by catching and
logging any exceptions thrown during server cleanup.
2016-10-17 15:28:50 +01:00
Phillip Webb d818a09ed8 Polish 2016-10-11 23:38:14 -07:00
Andy Wilkinson fe10ea73b0 Merge branch '1.4.x' into 1.5.x 2016-10-05 14:58:42 +01:00
Andy Wilkinson ad3e5c04bb Add a second, portal-compatible ID to the Gradle plugin
To be compatible with Gradle's plugin portal, plugins must have an
ID that uses a reverse domain name. This means that spring-boot is
not compatible.

This commit introduces a new ID, org.springframework.boot, and
deprecates the old ID.

Closes gh-6997
2016-10-05 14:58:26 +01:00
Phillip Webb 8fe755d281 Fixup parent POM version 2016-10-03 22:52:43 -07:00
Phillip Webb 6d11931421 Merge branch '1.4.x' into 1.5.x 2016-10-03 22:51:49 -07:00
Phillip Webb bd341cbac8 Polish 2016-10-03 22:51:21 -07:00
Phillip Webb a2315378d4 Formatting 2016-10-03 22:44:36 -07:00
Phillip Webb f2b0fa284e Merge branch '1.4.x' into 1.5.x 2016-10-03 22:38:22 -07:00
Madhura Bhave 16fe332f51 Fix NoClassDefFoundError when Mockito is missing
Update MockReset class to check for the presence of the MockUtil class
before attempting to use it.

Fixes gh-7065
2016-10-03 22:27:20 -07:00
Phillip Webb f59cc25e2b Fix eclipse warnings 2016-10-03 21:51:16 -07:00
Andy Wilkinson 901aa2764b Merge branch '1.4.x' into 1.5.x 2016-09-29 21:09:18 +01:00
Andy Wilkinson cf4142dbc0 Prevent htmlunit from pulling in commons-logging
Update dependency management to exclude commons-logging and add
an enforcer rule to spring-boot-samples to try and prevent unwanted
commons-logging dependencies from sneaking back in again.

Closes gh-7067
2016-09-29 21:08:15 +01:00
Andy Wilkinson 733cfe9f70 Merge branch '1.4.x' into 1.5.x 2016-09-29 16:29:35 +01:00
Andy Wilkinson 51eb1ac04d Declare embedded queue up front in samples that use Artemis
Closes gh-7063
2016-09-29 16:28:40 +01:00
Andy Wilkinson 2a035d0748 Remove support for Velocity following its deprecation in 1.4
Closes gh-6971
2016-09-29 15:44:36 +01:00
Andy Wilkinson 464915d2cc Remove support for HornetQ following its deprecation in 1.4
See gh-6971
2016-09-29 15:44:36 +01:00
Andy Wilkinson cd45ce9104 Merge branch '1.4.x' into 1.5.x 2016-09-29 13:12:11 +01:00
Andy Wilkinson 1bb5dc205d Update samples to use Artemis in place of HornetQ
Closes gh-7057
2016-09-29 11:52:09 +01:00
Vedran Pavic c4aa78679a Upgrade Hazelcast to 3.7.1
In addition, dependency management for `hazelcast-hibernate5` module has
been added, and a separate dependency version was introduced for
`hazelcast-hibernate4` module.

Closes gh-7023
2016-09-29 10:37:29 +02:00
Stephane Nicoll d117ec45b8 Merge branch '1.4.x' into 1.5.x 2016-09-22 07:53:27 +02:00
Stephane Nicoll 85fb273596 Fix spring-boot-antlib version
See gh-6978
2016-09-22 07:52:02 +02:00
Andy Wilkinson aaf435ff2a Suppress Neo4J-related deprecation warnings
See gh-6976
2016-09-21 20:57:05 +01:00
Andy Wilkinson c108da9d53 Upgrade to Spring Data Ingalls M1
Closes gh-6785
Closes gh-5835
2016-09-21 17:01:47 +01:00
Stephane Nicoll 5684924f60 Polish 2016-09-21 17:01:43 +02:00
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Stephane Nicoll 97083300d7 Fixup version numbers following release 2016-09-21 10:35:52 +02:00
Spring Buildmaster 7e9ed5e1a7 Next Development Version 2016-09-21 07:58:07 +00:00
Andy Wilkinson be33827f49 Simplify property validation sample and document need for static bean method
Closes gh-6627
2016-09-20 21:33:31 +01:00
Phillip Webb ede1657d79 Include Jetty EL dependency in starter
Update spring-boot-starter-jetty to include an EL dependency.

Fixes gh-6692
2016-09-08 16:52:53 -07:00
Andy Wilkinson 10402a651f Close context to ensure that logging system is cleaned up
See gh-6688
2016-08-25 20:41:43 +01:00
Andy Wilkinson 07a50bb16c Update the samples to make use of auto-configured TestRestTemplate
Closes gh-6730
2016-08-25 12:07:40 +01:00
Andy Wilkinson 46e03529fb Remove redundant bean declarations from some of the security samples
Closes gh-6740
2016-08-24 17:34:29 +01:00
Stephane Nicoll 96d5def17d Add reference to Caffeine in cache sample 2016-08-17 10:13:46 +02:00
Andy Wilkinson 1b42e1aaa3 Recommend setting spring.thymeleaf.mode: HTML when using Thymeleaf 3
Closes gh-6552
2016-08-08 10:40:01 +01:00
Phillip Webb c7a23eae56 Fixup version numbers following release 2016-07-28 14:38:17 -07:00
Spring Buildmaster 334baaeffd Next development version 2016-07-28 19:54:01 +00:00
Johnny Lim 9627d0ed66 Polish
Closes gh-6487
2016-07-27 12:29:33 +01:00
Phillip Webb 296dc7132b Allow JSON Testers to be `@Autowired`
Switch `@AutoConfigureJsonTesters` to use regular `@Autowired` injection
for JSON testers. Prior to this commit JSON Tester fields were
initialized directly which caused IDE issues and was also a little
confusing.

Fixes gh-6451
2016-07-26 21:41:37 -07:00
Phillip Webb 4a1e0d4544 Extend @AutoConfigureMockMvc print support
Update @AutoConfigureMockMvc to support extended print options including
`System.err` and `log.debug`. In addition the "default" print option
can now be overridden by adding `spring.test.mockmvc.print=...` to
`src/test/resources/application.properties`.

Fixes gh-6455
2016-07-25 13:17:26 -07:00
Johnny Lim 417fae4e27 Use the managed version for H2 in spring-boot-sample-actuator
Closes gh-6432
2016-07-20 11:29:43 +02:00
Phillip Webb 05ff4ed4e0 Upgrade to Tomcat 8.5.4 & remove tomcat-juli
Upgrade the managed Tomcat dependency to 8.5.4 and remove `tomcat-juli`
since it's now included in `tomcat-embed-core`.

Fixes gh-6192
2016-07-18 17:52:35 -07:00
Andy Wilkinson db83e89922 Add support for Thymeleaf 3 while keeping Thymeleaf 2 as the default
Closes gh-4393
2016-07-12 23:02:04 +01:00
Phillip Webb 43afc149a1 Consider WebAppConfiguration in @SpringBootTest
Update SpringBootTestContextBootstrapper to consider the
`@WebAppConfiguration` annotation and use sensible resourceBasePath
defaults.

Fixes gh-6371
2016-07-11 16:38:10 -07:00
Phillip Webb df8dfb093b Fix package tangle in jOOQ sample
Use a custom GeneratorStrategy to fix the package tangles that jOOQ
creates by default.

Fixes gh-6372
2016-07-11 12:50:42 -07:00
Andy Wilkinson 3286760073 Make it easier to add auto-configuration to a test slice
Previously, an entry had to be added to spring.factories using the
name of one of the @AutoConfigure… meta-annotations on the @…Test
annotation as the key. This indirection was unnecessarily complicated.

This commit simplifies things by allowing the name of the @…Test
annotation itself to be used as the key.

Closes gh-6335
2016-07-06 16:44:26 +01:00
Andy Wilkinson 92bb24e365 Avoid synchronizing on this and use an internal monitor instead
Where possible, code that previously synchronized on this (or on the
class in the case of static methods) has been updated to use an
internal monitor object instead. This allows the locking model that's
employed to be an implementation detail rather than part of the
class's API.

Classes that override a synchronized method continue to declare
the overriding method as synchronized. This ensures that locking
is consistent across the superclass and its subclass.

Closes gh-6262
2016-07-01 10:44:23 +01:00
Andy Wilkinson 93307bbd5b Merge branch '1.3.x' 2016-06-23 12:59:55 +01:00
Andy Wilkinson 17546628f5 Remove springloaded from samples
springloaded isn't required in any of the samples, yet some of them
make use of it without being a springloaded-specific sample. This
is creating the false impression that springloaded is necessary in
cases where it's not.
2016-06-23 12:58:42 +01:00
Andy Wilkinson 52e8ad4b6b Drop back to Hibernate 5.0.9.Final
The upgrade to Hibernate 5.2.0.Final has provide to be too
problematic to live with. It requires Java 8, is incompatible with
a number of other projects in the Hibernate ecosystem, and it's
unclear for how long it will be maintained. We'd previously used
Hibernate 5.1.0.Final but its maintenance is also unclear with
Hibernate 5.1.1.Final being more than 3 months overdue.

This commit drops back to Hibernate 5.0.9.Final. This has a few
advantages:

- It's Java 7 compatible
- It's had some time to mature and should be reasonably free of
  regressions for those moving from 4.3.x
- It's used in both Wildfly and JBoss EAP so there's a fair chance
  that it will continue to be maintained.

Closes gh-6198
2016-06-21 20:09:21 +01:00
Phillip Webb 7446235ff4 Polish 2016-06-20 20:13:13 -07:00
Andy Wilkinson 5e4f84cf46 Allow maximum HTTP header size to be configured when using Jetty 8
Closes gh-6190
2016-06-20 14:12:49 +01:00
Andy Wilkinson 5b688de8da Fix artifact id of new Tomcat 8.0 SSL sample
See gh-6164
2016-06-20 13:50:55 +01:00
Andy Wilkinson f28e3d54c5 Upgrade to Tomcat 8.5.3
This commit changes the default version of Tomcat to 8.5.3 while
also retaining support for Tomcat 8.0 and 7.0. The main difference
in 8.5 is that the ServerSocketFactory abstraction that allowed the
TrustStore and KeyStore to be configured programatically no longer
exists. This logic has been replaced with the use of a custom URL
protocol (springbootssl) that provides access to the key store and
trust store of an SslStoreProvider. In addition to working with 8.5,
this approach has the advantage of also working with 8.0 and 7.0.

Closes gh-6164
2016-06-20 13:27:47 +01:00
Stephane Nicoll 2ff9e3cfdc Upgrade to Hibernate 5.2
See gh-6111
2016-06-17 11:14:35 +02:00
Stephane Nicoll 888c5d4589 Polish contribution
Closes gh-6081
2016-06-16 11:33:57 +02:00
Vedran Pavic 8e2e493946 Remove HSQLDB dependency from Batch Starter
This commit removes HSQLDB dependency from Batch Starter as most apps
that use Spring Batch will prefer to use a RDBMS of their choice to store
batch metadata.

Additionally, explicit spring-jdbc dependency has been replaced with JDBC
Starter dependency.

See gh-6081
2016-06-16 11:33:57 +02:00
Vladimir Tsanev b303b3fe35 Support JSPs in Embedded Jetty
JSPs are now supported in executable WARs with embedded Jetty.

Fixes gh-367
Closes gh-5290
2016-06-15 16:01:54 +02:00
Andy Wilkinson ff602e60a0 Change default version of Jetty to 9.3
Closes gh-5825
2016-06-15 13:58:47 +01:00
Stephane Nicoll 17dfec7c4e Resume building against Spring Data Hopper snapshots
See gh-6132
2016-06-09 15:54:32 +02:00
Johnny Lim 5de9516255 Fix typos
Closes gh-6114
2016-06-03 07:20:39 -04:00
Phillip Webb b84330663d Update spring-boot-sample-test REST code
Update RemoteVehicleDetailsService and the related test to use the new
RestTemplateBuilder class and @RestClientTest annotation.

See gh-6030
See gh-5507
2016-05-31 10:18:07 -07:00