Commit Graph

4537 Commits

Author SHA1 Message Date
Andy Wilkinson
40fd0dce3c Merge branch '1.1.x' into 1.2.x
Conflicts:
	spring-boot-dependencies/pom.xml
2015-03-17 10:40:40 +00:00
Andy Wilkinson
1fba81e4ba Upgrade Spring Security 3.2.6.RELEASE
Closes gh-2582
2015-03-17 10:39:40 +00:00
Phillip Webb
a717813c83 Update required Spring Framework version in docs
The actual required Spring Framework version is 4.1.5.

See gh-2575
2015-03-16 23:20:41 -07:00
Phillip Webb
cac6ad21c1 Fix WebIntegrationTest JavaDoc
The example `@Value("server.local.port")` should read
`@Value("${local.server.port}")`.

Fixes gh-2628
2015-03-16 23:04:24 -07:00
Phillip Webb
16495d223a Polish 2015-03-16 14:11:43 -07:00
Phillip Webb
bdd61b8ec2 Merge branch '1.1.x' into 1.2.x 2015-03-16 13:51:57 -07:00
Phillip Webb
8b979fa2e6 Polish 2015-03-16 13:43:16 -07:00
Andy Wilkinson
1f40c8a9ba Tolerate breaking API changes in ActiveMQ 5.11.0
In ActiveMQ 5.11 the signature of
PooledConnectionFactory.setConnectionFactory has changed. It now takes
an Object rather than a ConnectionFactory. This change is not binary
backwards compatible so it causes a NoSuchMethodError as we compile
against 5.10.

This commit updates ActiveMQConnectionFactoryConfiguration to call
the setConnectionFactory method reflectively, looking for both the
ConnectionFactory and Object variants.

Closes gh-2640
2015-03-16 17:41:38 +00:00
Andy Wilkinson
78a00b1658 Polish EmbeddedServletContainer’s javadoc
Closes gh-2647
2015-03-16 17:14:10 +00:00
Andy Wilkinson
fc4376145c Process CompositePropertySources before EnumerablePropertySources
PropertySourcePropertyValues tries to process a PropertySource first
as an EnumerablePropertySource and then as a CompositePropertySource.
In Spring 4.1.2 CompositePropertySource was updated to extend
EnumerablePropertySource. This change meant that a
CompositePropertySource would always be processed as an
EnumerablePropertySource.

This commit updates PropertySourcePropertyValues to process a
PropertySource as a CompositePropertySource first and to then try it
is an EnumerablePropertySource.

Fixes gh-2608
2015-03-16 17:07:21 +00:00
Dave Syer
f1ecf53495 Delay instantiation of DataSource as late as possible
Unfortunately it still has to happen in a @PostConstruct (otherwise
JPA never sees the schema in time), but we can delay a bit by not
using @Autowired. Appears to fix the Spring Cloud problem
(https://github.com/spring-cloud/spring-cloud-config/issues/105).

Fixes gh-2658
2015-03-16 09:18:00 +00:00
Eric Dahl
018310e478 Fix broken link in docs 2015-03-10 08:21:21 +01:00
Andy Wilkinson
743482ab69 Tolerate Gauges with non-Number values
Spring Boot's metrics infrastructure requires a Metric to have a
Number value. Coda Hale's ThreadStatesGaugeSet includes a Gauge
named deadlocks with a Set<String> value (each entry in the set is a
description, including stacktrace, of a deadlocked thread). There's
no obvious way to coerce this to a Number, and there's already a
deadlocks.count metric in the set.

This commit updates MetricRegistryMetricReader to ignore the addition
of any Gauge with a non-Number value.

Fixes gh-2593
2015-03-05 11:07:58 +00:00
Andy Wilkinson
9f0654bd77 Merge branch '1.1.x' into 1.2.x
Conflicts:
	spring-boot-dependencies/pom.xml
2015-03-04 17:55:20 +00:00
Andy Wilkinson
44d98c6186 Upgrade to Freemarker 2.3.22
Closes gh-2581
2015-03-04 17:54:53 +00:00
Andy Wilkinson
71dde3ec89 Tolerate removal of JacksonJodaFormat in Jackson 2.5
We currently officially support Jackson 2.4, but some users wish to
use Jackson 2.5. This causes a failure as JacksonAutoConfiguration
depends on JacksonJodaFormat which exists in 2.4 but not in 2.5. This
commit updates JodaDataTimeJacksonConfiguration to make it conditional
on JacksonJodaFormat being on the classpath. This means that Jackson
2.5 users will not have configurable DateTime formatting
(added in 201fb5e5) but things will generally work once again.

Closes gh-2573
2015-03-04 17:52:01 +00:00
Andy Wilkinson
e927f52f26 Don’t use findAvailableTcpPort to allocate Undertow a random port
Using findAvailableTcpPort is prone to failure when another process
starts using the available port before Undertow starts. This commit
changes UndertowEmbeddedServletContainerFactory to pass the value of
zero down into Undertow where it will ultimately be passed to a
ServerSocket which will then use the underlying OS’s support for binding
to an available port.

Undertow doesn’t provide an API for getting the port(s) on which it’s
listening. Previously, reflection was being used to access the listener
configuration but, when a random port is used, this configuration would
return zero rather than the actual port. The reflective logic has been
updated to look at Undertow’s channels from which the underlying
ServerSocket can be accessed and the local port retrieved

Closes gh-2584
2015-03-04 17:20:06 +00:00
Andy Wilkinson
4487823ff9 Improve thread-safety of MetricRegistryMetricReader
ee567fa boldy claimed that it had made MetricRegistryMetricReader
thread-safe. It had not. This commit should actually make it thread
safe. I hope.

One notable improvement is that MetricRegistryMetricReader.findAll()
will no longer contain null values if a metric is removed on another
thread during iteration.

names is now a ConcurrentHashMap to allow it to be safely read and
written without holding a lock.

reverse is a LinkedMultiValueMap  which is not thread-safe. This could
lead to values being lost when concurrent add calls were made. Access
to reverse is now protected by synchronizing on an internal monitor
object.

Calls to containsKey(key) followed by get(key) have been reworked to
only call get(key), this avoids the possibility of the key being
removed after the contains check but before the get.

Closes gh-2590
2015-03-04 15:03:03 +00:00
Andy Wilkinson
f761916b51 Honor unpack for war files
Previously repackaging of an archive was performed in three steps:

1. Write the manifest
2. Write entries from the source archive into the destination
3. Write any libraries into the destination if they’re not already there

This worked fine for jar files, but not for war files. In the war file
case the libraries are already in the source archive’s WEB-INF/lib
directory so they’re copied into the destination in step 2. This means
that step 3 largely becomes a no-op and, crucially, the UNPACK comment
is not applied to any libraries that require it.

This commit reorders steps 2 and 3 so that the libraries are copied into
the destination first (allowing the UNPACK comment to be written, if
required) and then any entries in the source are written into the
destination if they’re not already there.

Fixes gh-2588
2015-03-04 13:42:50 +00:00
Andy Wilkinson
ee567fa8dd Make MetricRegistryMetricReader thread-safe
MetricRegistryMetricReader’s fields where neither final, nor volatile
but could be accessed on multiple threads. This lead to visibility
problems where the value of a field would unexpectedly be null, causing
an NPE.

This commit updates all of the fields to declare them as final, thereby
ensuring that their values are guaranteed to be visible across different
threads.

Fixes gh-2590
2015-03-03 16:54:30 +00:00
Rob Winch
493d7a364d Merge branch '1.1.x' into 1.2.x 2015-03-02 14:52:08 -06:00
Rob Winch
760d6eceee Fix Unnecessarily Adding Default Security User
Fixes gh-2567
2015-03-02 14:45:50 -06:00
Phillip Webb
0174476ff1 Merge branch '1.1.x' into 1.2.x 2015-03-02 12:12:57 -08:00
Phillip Webb
50e1f80581 Remove .factorypath files 2015-03-02 12:12:06 -08:00
Phillip Webb
561ed99b5b Merge branch '1.1.x' into 1.2.x 2015-03-02 12:09:24 -08:00
Phillip Webb
8ce39bda88 Fixup version numbers following release 2015-02-26 15:59:57 -08:00
Spring Buildmaster
8f0ad02237 Next development version 2015-02-26 15:26:53 -08:00
Phillip Webb
8a49218e82 Fixup version numbers following release 2015-02-26 14:17:25 -08:00
Phillip Webb
8ecbef08a5 Update copyright year in docs 2015-02-26 14:05:45 -08:00
Spring Buildmaster
aea68f0c32 Next development version 2015-02-26 13:01:31 -08:00
Phillip Webb
10caace55f Upgrade to Spring Security 3.2.6
Closes gh-2539
2015-02-26 11:16:11 -08:00
Phillip Webb
798e5f919d Refine @TestPropertySource locations support
Update SpringApplicationContextLoader to configure test property
locations before the ApplicationContext is actually started.

Fixes gh-2198
2015-02-26 11:13:34 -08:00
Andy Wilkinson
80111c801a Consider custom authentication database when creating MongoClient
Previously, MongoProperties did not consider the configuration of a
custom authentication database when creating a MongoClient. This
commit updates MongoProperties to use the authentication database
when it is configured, falling back to the normal database when it is
not configured.

Closes gh-2562
2015-02-26 15:30:02 +00:00
Stephane Nicoll
1e3a057786 polish meta-data description 2015-02-26 10:31:00 +01:00
Stephane Nicoll
65c974d7f6 Merge pull request #2557 from izeye/elasticsearch
* elasticsearch:
  Remove unnecessary if statement
2015-02-26 08:30:43 +01:00
izeye
0073ab078d Remove unnecessary if statement 2015-02-26 08:30:11 +01:00
Stephane Nicoll
a48296f5c0 Merge pull request #2555 from izeye/javadoc
* javadoc:
  Fix Javadoc
2015-02-26 08:25:16 +01:00
izeye
2e7ad2252f Fix Javadoc 2015-02-26 08:24:56 +01:00
Phillip Webb
ee1cab7f5b Improve LevelRemappingAppender documentation
Fixes gh-2443
2015-02-25 14:07:14 -08:00
Phillip Webb
54f334e370 Add support for @TestPropertySource locations
Update SpringApplicationContextLoader to support @TestPropertySource
location attributes.

Fixes gh-2198
2015-02-25 13:47:48 -08:00
Phillip Webb
1231da1c2f Add security.basic.authorize-mode property
Add a `security.basic.authorize-mode` property that can be used to
affect how basic security authorization is applied.

Fixes gh-2462
2015-02-25 12:36:55 -08:00
Phillip Webb
f7221be7c9 Rename spring.favicon.enabled property
Rename `spring.favicon.enabled` to `spring.mvc.favicon.enabled`.

See gh-2377
2015-02-25 11:36:28 -08:00
Phillip Webb
0a4daf0d7e Merge pull request #2553 from izeye/docs
* docs:
  Improve documentation
2015-02-25 11:33:42 -08:00
izeye
1493da1e03 Improve documentation
Closes gh-2553
2015-02-25 11:32:58 -08:00
Phillip Webb
2a87971fc2 Polish javadoc 2015-02-25 11:26:35 -08:00
Andy Wilkinson
f43f2fb8c4 Upgrade to Jetty 9.2.9
Closes gh-2554
2015-02-25 17:11:53 +00:00
Phillip Webb
b48e31d9d8 Polish 2015-02-24 22:29:05 -08:00
Phillip Webb
4895b15bec Add mustache to the documented starters
Closes gh-2242
2015-02-24 21:46:20 -08:00
Phillip Webb
c1dcd85f60 Simplify MustacheEnvironmentCollector
Simplify the MustacheEnvironmentCollector so that it no longer binds
the Spring Environment to a Map.

See gh-2242
2015-02-24 21:44:49 -08:00
Phillip Webb
d5a82aaed8 Document "annotation processing with Gradle"
Provide details of how to configure Gradle, including the work-around
require to parse any additional metadata files.

Fixes gh-2316
2015-02-24 20:26:54 -08:00