Commit Graph

27490 Commits

Author SHA1 Message Date
Andy Wilkinson
e04a8ff57d Merge branch '1.3.x' 2016-02-24 11:05:30 +00:00
Andy Wilkinson
70ab613465 Merge pull request #5168 from Vedran Pavic
* gh-5168:
  Tag Docker images created by launch script integration tests
2016-02-24 11:05:07 +00:00
Vedran Pavic
2641fe8f26 Tag Docker images created by launch script integration tests
Closes gh-5168
2016-02-24 11:04:27 +00:00
Andy Wilkinson
f7eec4b3de Merge branch '1.3.x' 2016-02-24 11:00:15 +00:00
Andy Wilkinson
b061aa5d7e Upgrade to Spring Data Gosling SR4
Closes gh-5119
2016-02-24 10:59:30 +00:00
Andy Wilkinson
03ebef58fb Merge branch '1.3.x' 2016-02-24 10:58:02 +00:00
Andy Wilkinson
b1afd091c2 Document log file endpoint's support for using Range header
Closes gh-5062
2016-02-24 10:56:32 +00:00
Andy Wilkinson
64fd322ad1 Merge branch '1.3.x' 2016-02-24 10:32:32 +00:00
Andy Wilkinson
a6b1f4ce63 Add a note about a fully executable jar's working directory
Closes gh-5164
2016-02-24 10:30:41 +00:00
Andy Wilkinson
a3afc859bd Merge branch '1.3.x' 2016-02-23 17:45:28 +00:00
Andy Wilkinson
617c97322d Allow endpoint paths to be configured via endpoint.<name>.path
Support for configuring an endpoint’s path separately from its id was
introduced in 97255785, but it didn’t work for a variety of reasons:

 1. Some custom MVC endpoints did not have configuration properties
    bound to them
 2. Some generic endpoints rejected the path property as they were
    configured not to ignore unknown fields
 3. The property used to configure the path was dependent on the id
    of the endpoint. This meant that the path property’s name would
    change if the endpoint’s id was changed

This commit addresses these problems:

 1. @ConfigurationProperties has been added to custom MvcEndpoints where
    it was missing
 2. Generic endpoints have been updated to ignore unknown fields,
    allowing the path of their MVC adapter to be configured
 3. Rather than using the id of a generic endpoint to determine the name
    of its path property, the prefix or value of the endpoint’s
    @ConfigurationProperties annotation is used instead. Any generic
    endpoint that is not annotated with @ConfigurationProperties is
    ignored, making its path unconfigurable.

Closes gh-5105
2016-02-23 17:06:51 +00:00
Stephane Nicoll
2da9f6d91c Merge branch '1.3.x' 2016-02-23 14:43:56 +01:00
Stephane Nicoll
c4205d04b3 Rework ListenerContainerFactory configurers
Rework commit b726974 to avoid exposing setters that would permit anyone
to change Spring Boot's defaults. Also, since these are configurers of a
specific instance, they should be named accordingly.

Closes gh-5138
2016-02-23 14:43:33 +01:00
Phillip Webb
34ae7e3eee Fix packages and annotations used in sample
Fixup accidental error in previous commit.
2016-02-22 12:07:49 -08:00
Phillip Webb
95c4cdbedc Fix packages and annotations used in sample
Update a few of the samples to correct the packages used in tests and
to make use of the `@SpringBootApplication` annotation.
2016-02-22 10:29:43 -08:00
Phillip Webb
566008336c Polish 2016-02-22 10:27:10 -08:00
Andy Wilkinson
f46862d186 Merge branch '1.3.x' 2016-02-22 17:29:53 +00:00
Andy Wilkinson
f94e8bd287 Do not try to auto-configure Jolokia if Spring MVC is not on classpath
The Jolokia auto-configuration requires ServletWrappingController from
Spring MVC to be on the classpath. This commit updates the
auto-configuration to make it conditional on the presence of this
class.

Closes gh-5153
2016-02-22 17:29:37 +00:00
Andy Wilkinson
cc4562f96a Merge branch '1.3.x' 2016-02-22 16:07:47 +00:00
Andy Wilkinson
b4cda625c4 Break cycle caused by JndiDataSourceAutoConfiguration
There's a long cycle when Spring Data REST, Data JPA and Actuator
are used in an app that retrieves its DataSource from JNDI. The cycle
is:

- WebMvcAutoConfiguration
- HttpMessageConverters
- MappingJackson2HttpMessageConverter (needs an ObjectMapper)
- SpringBootRepositoryRestMvcConfiguration
- ObjectMapper
- RepositoryResourceMappings (part of a custom Jackson module)
- Repositories
- EntityManagerFactory (Triggered by application's Spring Data JPA repository)
- HibernateJpaAutoConfiguration
- JndiDataSourceAutoConfiguration
- MBeanExporter (Used to prevent export of DataSource MBean that's already in JMX)
- EndpointMBeanExportAutoConfiguration
- ObjectMapper (Used to format JSON produced by the exported endpoints)

Spring Data Rest caused the ObjectMapper to depend on JPA. JPA depends
on the DataSource. JnidDataSourceAutoConfiguration depends on the
MBeanExporter. Actuator's MBeanExporter requires an ObjectMapper to
produce JSON strings.

This commit breaks the cycle by making JndiDataSourceAutoConfiguration
access the MBeanExporter lazily. Rather than using `@Lazy`. which does
not work with `@Autowired(required=false)`, the application context
is injected and the MBeanExporter is retrieved manually when it is
needed.

Closes gh-4980
2016-02-22 16:01:23 +00:00
Andy Wilkinson
cb9780dbb8 Merge branch '1.3.x' 2016-02-22 15:49:23 +00:00
Andy Wilkinson
d05f94170b Merge pull request #5190 from Gary Russell
* gh-5190:
  Upgrade to Spring Integration 4.2.5.RELEASE
2016-02-22 15:48:50 +00:00
Gary Russell
5e180641ec Upgrade to Spring Integration 4.2.5.RELEASE
Closes gh-5190
2016-02-22 15:48:15 +00:00
Andy Wilkinson
1697276d7d Merge branch '1.3.x' 2016-02-22 15:46:59 +00:00
Andy Wilkinson
1c00fdd80c Upgrade to Undertow 1.3.18.Final
Closes gh-5182
2016-02-22 15:45:36 +00:00
Andy Wilkinson
0392d126b8 Merge branch '1.3.x' 2016-02-22 14:36:26 +00:00
Andy Wilkinson
5d256196a6 Upgrade to Groovy 2.4.6
Closes gh-4149
2016-02-22 14:34:12 +00:00
Stephane Nicoll
7df05c7d6d Merge branch '1.3.x' 2016-02-22 14:38:21 +01:00
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
2016-02-22 14:28:34 +01:00
Andy Wilkinson
ca79ba8291 Add dependency management for new spring-restdocs-restassured module
Closes gh-5160
2016-02-22 10:22:57 +00:00
Andy Wilkinson
bbef9fcdb3 Add dependency management for new spring-session-data-gemfire module
Closes gh-5161
2016-02-22 10:21:58 +00:00
Dave Syer
e021a30745 Merge branch '1.3.x'
Conflicts:
	spring-boot-dependencies/pom.xml
2016-02-20 16:40:21 +00:00
Dave Syer
f2c34612f6 Fix javadocs on ManagementServerProperties 2016-02-20 16:38:25 +00:00
Dave Syer
14a5feacea Update to OAuth 2.0.9 2016-02-20 16:34:53 +00:00
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
2016-02-20 00:22:28 -08:00
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
2016-02-19 22:16:06 -08:00
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
2016-02-19 19:28:37 -08:00
Phillip Webb
4b55144d80 Polish 2016-02-19 16:19:22 -08:00
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
2016-02-19 16:11:26 -08:00
Phillip Webb
c6c2959aa3 Merge remote-tracking branch '1.3.x' 2016-02-19 16:10:09 -08:00
Phillip Webb
a9afe0a944 Formatting 2016-02-19 16:07:10 -08:00
Andy Wilkinson
5ed4ef1272 Add manifest entries for location of lib and classes in executable archives
Closes gh-5183
2016-02-19 17:04:51 +00:00
Andy Wilkinson
59e119eb9a Merge pull request #4823 from Pedro Costa
* gh-4823:
  Polish contribution
  Make TLS protocols and cipher suites configurable via the environemnt
2016-02-19 16:54:47 +00:00
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
2016-02-19 16:54:11 +00:00
Pedro Costa
766ccd753b Make TLS protocols and cipher suites configurable via the environemnt
Closes gh-4823
2016-02-19 16:48:53 +00:00
Andy Wilkinson
7512687cba Upgrade to Spring Session 1.1.0.RC1
Closes gh-5161
2016-02-19 16:19:52 +00:00
Andy Wilkinson
99b3af9216 Use a random server port in the Couchbase sample’s tests 2016-02-19 16:13:42 +00:00
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
2016-02-19 15:44:03 +00:00
Andy Wilkinson
d454896755 Update documentation following changes to executable jar layout
See gh-4897
2016-02-19 15:41:53 +00:00
Andy Wilkinson
fcbf15aea3 Update Ant support following changes the executable jar layout
Closes gh-4897
2016-02-19 15:00:25 +00:00