Commit Graph

7767 Commits (14d718852189e0d873857a51a021e0391667b0cc)
 

Author SHA1 Message Date
Andy Wilkinson 1697276d7d Merge branch '1.3.x' 9 years ago
Andy Wilkinson 1c00fdd80c Upgrade to Undertow 1.3.18.Final
Closes gh-5182
9 years ago
Andy Wilkinson 0392d126b8 Merge branch '1.3.x' 9 years ago
Andy Wilkinson 5d256196a6 Upgrade to Groovy 2.4.6
Closes gh-4149
9 years ago
Stephane Nicoll 7df05c7d6d Merge branch '1.3.x' 9 years ago
Stephane Nicoll 094f7aa20e Fix Hazelcast Cache auto-configuration ordering
Spring Boot supports the automatic configuration of an additional
HazelcastInstance if one already exists and an explicit property has been
set to use a different configuration for caching. So three cases are
supported really: no `HazelcastInstance` exists so we need to create one
anyway or an `HazelcastInstance` already exists; in that latter case, we
should either reuse it or create a new one.

Unfortunately, the conditions that checked those three use cases were
not ordered consistently and we could easily get in a situation where
both conditions were evaluated.

This commit makes sure that we  first check if an `HazelcastInstance`
exists and then (and only then) we create the missing `HazelcastInstance`
used for caching. The tests have also been improved to validate the
proper `HazelcastInstance` is used for caching.

Closes gh-5181
9 years ago
Andy Wilkinson ca79ba8291 Add dependency management for new spring-restdocs-restassured module
Closes gh-5160
9 years ago
Andy Wilkinson bbef9fcdb3 Add dependency management for new spring-session-data-gemfire module
Closes gh-5161
9 years ago
Dave Syer e021a30745 Merge branch '1.3.x'
Conflicts:
	spring-boot-dependencies/pom.xml
9 years ago
Dave Syer f2c34612f6 Fix javadocs on ManagementServerProperties 9 years ago
Dave Syer 14a5feacea Update to OAuth 2.0.9 9 years ago
Phillip Webb 2baad56108 Fix spring-boot-launch-script-tests dependency
Remove the reference to the spring-boot:test jar since it's not
published.

See gh-5184
9 years ago
Phillip Webb 602a09332d Switch disallowedMethods test to use PATCH
Update the requestsWithDisallowedMethodsAreRejected test to use PATCH
rather than HEAD. The change is to allow support for Spring Framework
4.3 which will implicitly map HEAD requests to GET.

Pre-flight requests are also only for "non-simple" HTTP methods [1]
(i.e. anything but GET, HEAD, POST) so there is really no such a thing
as a pre-flight request for HEAD.

[1] https://www.w3.org/TR/cors/#resource-preflight-requests
9 years ago
Phillip Webb 89b7704977 Extract spring-boot-test.jar
Relocate the `org.springframework.boot.test` package from the
`spring-boot.jar` to `spring-boot-test.jar`.

Fixes gh-5184
9 years ago
Phillip Webb 4b55144d80 Polish 9 years ago
Phillip Webb 03dad33b0c Polish diagnostics support
Rework a few parts of the diagnostics support:

- Move code from SpringApplication to FailureAnalyzers
- Allow AbstractFailureAnalyzer to take generic cause type
- Move own analyzers into a new package and make package private

See gh-4907
9 years ago
Phillip Webb c6c2959aa3 Merge remote-tracking branch '1.3.x' 9 years ago
Phillip Webb a9afe0a944 Formatting 9 years ago
Andy Wilkinson 5ed4ef1272 Add manifest entries for location of lib and classes in executable archives
Closes gh-5183
9 years ago
Andy Wilkinson 59e119eb9a Merge pull request #4823 from Pedro Costa
* gh-4823:
  Polish contribution
  Make TLS protocols and cipher suites configurable via the environemnt
9 years ago
Andy Wilkinson 742df6b63b Polish contribution
Rename the new property to enabledProtocols to align more closely with
Undertow and Tomcat’s underlying configuration setting.

Closes gh-2109
9 years ago
Pedro Costa 766ccd753b Make TLS protocols and cipher suites configurable via the environemnt
Closes gh-4823
9 years ago
Andy Wilkinson 7512687cba Upgrade to Spring Session 1.1.0.RC1
Closes gh-5161
9 years ago
Andy Wilkinson 99b3af9216 Use a random server port in the Couchbase sample’s tests 9 years ago
Andy Wilkinson df6c204193 Provide better diagnostics when an application fails to start
This commit introduces a new failure analysis mechanism that can be
used to provide diagnostics to a user when their application fails
to start.

When application context refresh fails. FailureAnalyzer
implementations are loaded via spring.factories. The analyzers are
called in order, with the first non-null analysis of the failure
being used. The analysis is reported to the use by
FailureAnalysisReporters which are also loaded via spring.factories.

A single FailureAnalysisReporter is provided out of the box. It logs
an error message with details of the analysis, providing the user
with a description of the failure and, if available, some actions
that they may be able to take to resolve the problem without also
displaying a stack trace that is of little value.

Two analysers are provided initially. One for an embedded servlet
container port clash and another for BeanCurrentlyInCreationExceptions.
More analysers are planned (for UnsatisfiedDependencyException and for
NoUniqueBeanDefinitionException) once some updates have been made
to Spring Framework to make those failures more amenable to analysis.

Closes gh-4907
9 years ago
Andy Wilkinson d454896755 Update documentation following changes to executable jar layout
See gh-4897
9 years ago
Andy Wilkinson fcbf15aea3 Update Ant support following changes the executable jar layout
Closes gh-4897
9 years ago
Andy Wilkinson 87fe0b2ade Use a conventional delegation model in LaunchedURLClassLoader
When an application is run as an executable archive with nested jars,
the application's own classes need to be able to load classes from
within the nested jars. This means that the application's classes need
to be loaded by the same class loader as is used for the nested jars.
When an application is launched with java -jar the contents of the
jar are on the class path of the app class loader, which is the
parent of the LaunchedURLClassLoader that is used to load classes
from within the nested jars. If the root of the jar includes the
application's classes, they would be loaded by the app class loader
and, therefore, would not be able to load classes from within the
nested jars.

Previously, this problem was resolved by LaunchedURLClassLoader being
created with a copy of all of the app class laoder's URLs and by
using an unconventional delegation model that caused it to skip its
parent (the app class loader) and jump straight to its root class
loader. This ensured that the LaunchedURLClassLoader would load both
the application's own classes and those from within any nested jars.
Unfortunately, this unusual delegation model has proved to be
problematic. We have seen and worked around some problems with Java
Agents (see gh-4911 and gh-863), but there are others (see gh-4868)
that cannot be made to work with the current delegation model.

This commit reworks LaunchedURLClassLoader to use a conventional
delegate model with the app class loader as its parent. With this
change in place, the application's own classes need to be hidden
from the app class loader via some other means. This is now achieved
by packaging application classes in BOOT-INF/classes (and, for
symmetry, nested jars are now packaged in BOOT-INF/lib). Both the
JarLauncher and the PropertiesLauncher (which supports the executable
jar layout) have been updated to look for classes and nested jars in
these new locations.

Closes gh-4897
Fixes gh-4868
9 years ago
Andy Wilkinson 9be69f1ac7 Improve JDBC driver dependency management and class name test coverage
Previously, the DatabaseDriver enumeration contained entries for
some databases without having dependency management for the database
driver dependency. This leads to the possibility of a user inadvertently
using the wrong version of a driver where the class names do not match
those listed in the enumeration. A further problem is that we do not
test that the class names listed in the enumeration match the
names of Driver and XADataSource implementations in the database driver.

This commit completes the database driver dependency management so that
dependency management is provided for every driver that is both listed
in DatabaseDriver and available in Maven Central. It also adds tests
for DatabaseDriver that ensures that each class that is listed exists
and implements the required interface (java.sql.Driver or
javax.sql.XADataSource).

Closes gh-4946
9 years ago
Andy Wilkinson ff99bb0730 Set main thread's context class loader when starting Tomcat
When an app is deployed to Tomcat, all of the application's startup
is performed with a WebAppClassLoader being the thread context
class loader. When an app is using embedded Tomcat, the
WebAppClassLoader is created as part of the application starting but
is never set as the thread context class loader. This difference
in TCCL can cause problems. For example, it breaks the use of JNDI
during application startup with embedded Tomcat.

This commit updates the embedded Tomcat servlet container to set
the TCCL to be the WebAppClassLoader once the Tomcat context has
been started. Once Tomcat is stopped, it sets the TCCL back to the
ClassLoader that loaded it.

Closes gh-2308
9 years ago
Andy Wilkinson d6e0b5a165 Use @DirtiesContext to avoid unwanted context caching in the tests
We rarely use the same configuration in multiple test classes, but
Spring’s Test framework caches each context by default. For projects
with large numbers of integration tests, this can lead to tens of
contexts being cached. This increases memory usage, live thread count,
etc for no benefit.

This commit adds @DirtiesContext to the integration tests in
spring-boot, spring-boot-autoconfigure, and spring-boot-actuator so
that the context is closed once the test class has completed.

See gh-5141
9 years ago
Stephane Nicoll 166a27f16c Merge pull request #5128 from christophstrobl/issue/sd-redis-1.7.0-cluster-support
* pr/5128:
  Polish contribution
  Add Redis Cluster support
9 years ago
Stephane Nicoll a95568d3e8 Polish contribution
Closes gh-5128
9 years ago
Christoph Strobl fc22731420 Add Redis Cluster support
Introduce configuration options for "spring.redis.cluster.nodes" and
"spring.redis.cluster.max-redirects". Properties such as "timeout" and
others remain available via "spring.redis.timeout" and do not have to be
configured on the cluster itself.

See gh-5128
9 years ago
Andy Wilkinson d66bc7b1ee Merge branch '1.3.x' 9 years ago
Andy Wilkinson d3074a086c Increase timeout for startup of embedded Cassandra
The integration tests for the Spring Data Cassandra sample application
fail intermittently, apparently due to Cassandra failing to start
within the default timeout period of 10000ms.

In attempt to get the tests to pass reliably, this commit increases
the timeout to 60000ms (1 minute).
9 years ago
Stephane Nicoll 2c8d4421c2 Merge pull request #5167 from mkopylec/master
* pr/5167:
  Session couchbase starter entry
9 years ago
Mariusz Kopylec a048e4bd65 Session couchbase starter entry
Closes gh-5167
9 years ago
Stephane Nicoll c81ba0a951 Merge pull request #5171 from bclozel/gh-4683
* pr/5171:
  Polish contribution
  Add configuration key for GzipResourceResolver
9 years ago
Stephane Nicoll 888270bd03 Polish contribution
Closes gh-5171
9 years ago
Brian Clozel 4ca04abcb2 Add configuration key for GzipResourceResolver
This commit adds a new key that configures a GzipResourceResolver
in the resource handling chain.

Configuring an application with the following will add that resolver,
which checks for gzipped resources in the configured locations:

```
spring.resources.chain.gzipped=true
```

This means that if a resource "style.css" is requested, the
GzipResourceResolver will look for resources named "style.css.gz", which
should be a gzipped variant of the "style.css" file. Note that this
resolver only checks for variants if the client supports the "gzip"
encoding, as defined in the "Accept-Encoding" HTTP request headers.

Fixes #4683
9 years ago
Andy Wilkinson 4189e145bb Polishing
- Remove usages of deprecated APIs
 - Remove redundant version on dependency declaration
9 years ago
Andy Wilkinson 3b068c8bc2 Upgrade to Spring Integration 4.3.0.M1
Closes gh-5163
9 years ago
Andy Wilkinson e0ee46ec61 Upgrade to Spring AMQP 1.6.0.M1
Closes gh-5162
9 years ago
Stephane Nicoll b60e9e5cb9 Expose hints for Maps
This commit fixes the json parser so that hints for maps is also made
available.

Closes gh-5152
9 years ago
Stephane Nicoll d5732afa67 Add missing configuration entry 9 years ago
Stephane Nicoll 0e10dbc269 Polish documentation
Some connection pool specific keys were still advertized in the
documentation.
9 years ago
Stephane Nicoll 348f7ae9aa Merge branch '1.3.x' 9 years ago
Stephane Nicoll 62bc2abac0 Better document JTA properties
Closes gh-5143
9 years ago
Stephane Nicoll 90f0fc6ce3 Harmonize JTA properties
Previously, both Atomikos and Bitronix were bound on the `spring.jta`
namespace which makes very hard to figure out which property belong to
which implementation. Besides, `AtomikosProperties` only exposed public
setter which does not generate any useful meta-data.

This commit moves the external configuration for Atomikos and Bitronix to
`spring.jta.atomikos.properties` and `spring.jta.bitronix.properties`
respectively. It also improves the meta-data support for those two
namespaces.

Closes gh-5165
9 years ago