Commit Graph

5763 Commits

Author SHA1 Message Date
Dave Syer c8ec2cb70b Add missing annotation to openTSDB sample 2015-09-28 13:54:50 +01:00
Phillip Webb c73ffdd5a6 Fix javadoc import issues 2015-09-26 01:58:13 -07:00
Phillip Webb 31f0c837fd Fix broken Cassandra sample tests
See gh-2064
2015-09-26 01:16:06 -07:00
Phillip Webb 2aeb88a2ba Upgrade to Spring Framework 4.2.2.BUILD-SNAPSHOT
Use SNAPSHOT build in preparation for 4.2.2.

See gh-4020
2015-09-26 01:14:11 -07:00
Phillip Webb a168670a8d Use static Patterns in MetricsFilter
Update MetricsFilter to use static `Pattern` instances for regex
replacements rather than compiling them each time.

Fixes gh-3996
2015-09-26 00:10:20 -07:00
Phillip Webb 57a698f388 Fix broken Cassandra tests
See gh-2064
2015-09-25 23:59:00 -07:00
Phillip Webb e39d571bff Merge pull request #2214 from jdubois/master
* gh-2214:
  Add Cassandra support
2015-09-25 23:01:53 -07:00
Julien Dubois c401330901 Add Cassandra support
Add auto-configuration support and health checks for Cassandra and
Spring Data Cassandra.

Fixes gh-2064
Closes gh-2214
2015-09-25 23:00:53 -07:00
Phillip Webb 49fab4a60f Fix broken documentation link 2015-09-25 22:04:30 -07:00
Andy Wilkinson c55900b433 Simplify Jackson-related auto-configuration for HATEOAS and Data REST
This commit simplifies the Jackson-related auto-configuration that’s
applied when Spring HATEOAS and Spring Data REST are on the classpath.

Previously, Boot used Jackson2HalModule to apply the HAL-related
ObjectMapper configuration to the context’s primary ObjectMapper. This
was to allow HAL-formatted responses to be sent for requests accepted
application/json (see gh-2147). This had the unwanted side-effect of
polluting the primary ObjectMapper with HAL-specific functionality.
Furthermore, Jackson2HalModule is an internal of Spring HATEOAS that
@olivergierke has asked us to avoid using.

This commit replaces the use of Jackson2HalModule with a new approach.
Now, the message converters of any RequestMappingHandlerAdapter beans
are examined and any TypeConstrainedMappingJackson2HttpMessageConverter
instances are modified to support application/json in addition to their
default support for application/hal+json. This behaviour can be disabled
by setting spring.hateoas.use-hal-as-default-json-media-type to false.
This property is named after Spring Data REST’s configuration option
which has the same effect when using Spring Data REST. The new property
replaces the old spring.hateoas.apply-to-primary-object-mapper property.

Previously, when Spring Data REST was on the classpath,
JacksonAutoConfiguration would be switched off resulting in the context
containing multiple ObjectMappers, none of which was primary.

This commit configures RepositoryRestMvcAutoConfiguration to run after
JacksonAutoConfiguration. This gives the latter a chance to create its
primary ObjectMapper before the former adds its ObjectMapper beans to
the context.

Previously, the actuator’s hypermedia support assumed that the
HttpMessageConverters bean would contain every HttpMessageConverter
being used by Spring MVC. When Spring HATEOAS is on the classpath this
isn’t the case as it post-processes RequestMappingHandlerAdapter beans
and adds a TypeConstrainedMappingJackson2HttpMessageConverter to them.
This wasn’t a problem in the past as the primary ObjectMapper, used by a
vanilla MappingJackson2HttpMessageConverter, was configured with Spring
HATEOAS’sJackson2HalModule. Now that this pollution has been tidied up
the assumption described above no longer holds true. MvcEndpointAdvice,
which adds links to the actuator’s json responses, has been updated
to look at the HttpMessageConverters of every
RequestMappingHandlerAdapter when it’s trying to find a converter to
use to write a response with additional hypermedia links.

Integration tests have been added to spring-boot-actuator to ensure
that the changes described above have not regressed the ability to
configure its json output using spring.jackson.* properties (see
gh-1729).

Closes gh-3891
2015-09-24 20:44:10 +01:00
Phillip Webb 028fc04777 Fix checkstyle errors 2015-09-24 10:57:58 -07:00
Phillip Webb b95bb54e8c Make BasicErrorController easier to subclass
Extract a new AbstractErrorController base class for users to extend
if they don't like the default BasicErrorController.

Fixes gh-3998
2015-09-24 10:45:00 -07:00
Phillip Webb 764c0a8bf9 Make FlywayMigrationInitializer ordered and public
Update `FlywayAutoConfiguration` to allow explicit ordering of the
`FlywayMigrationInitializer`.

Fixes gh-4011
2015-09-24 10:35:12 -07:00
Phillip Webb 06f3202c68 Improve DataSourceProperties exception messages
Update DataSourceProperties exceptions to include a less misleading
message. Errors message now note that you may need to add an embedded
database to the classpath or active a profile to pickup specific
settings.

Fixes gh-4012
2015-09-24 10:24:08 -07:00
Phillip Webb 44c122307e Tweak port usage to try and fix Windows CI build 2015-09-24 09:46:14 -07:00
Phillip Webb 676efe7ad6 Fixup following package auto-configuration moves
A string based exclude was missed in commit c629813165.

See gh-4002
2015-09-24 00:28:38 -07:00
Phillip Webb bf34dc5013 Merge pull request #3719 from sbuettner/master
* pr/3719:
  Add statsd metric export auto-configuration
2015-09-24 00:21:58 -07:00
Simon Buettner 70031cca66 Add statsd metric export auto-configuration
Update MetricExportAutoConfiguration to auto-configure statsd metrics
export when a `spring.metrics.export.statsd.host` property is set.

Closes gh-3719
2015-09-24 00:19:56 -07:00
Phillip Webb 9128f2b902 Merge pull request #3915 from fabriciocolombo/liquibase
* pr/3915:
  Add Liquibase labels and parameters properties
2015-09-23 23:56:51 -07:00
Fabricio Colombo 605eb8a14d Add Liquibase labels and parameters properties
Update `LiquibaseAutoConfiguration` and `LiquibaseProperties` to add
support for labels and parameters.

Closes gh-3915
2015-09-23 23:56:51 -07:00
Phillip Webb d0dbe93755 Merge pull request #3938 from candrews/patch-2
* pr/3938:
  Add `git.properties` to default devtools excludes
2015-09-23 23:56:50 -07:00
Craig Andrews 84da5a26a7 Add `git.properties` to default devtools excludes
Update `DevToolsProperties` to exclude `git.properties` files.

Prior to this commit any application configured to write `git.properties`
could trigger unexpected application restarts. The problem is particularly
prevalent when using Eclipse M2E in combination with the
`git-commit-id-plugin`.

Closes gh-3938
2015-09-23 23:56:43 -07:00
Phillip Webb a63ec53d2b Merge pull request #3962 from izeye/hazelcast
* pr/3962:
  Remove duplicate `@ConditionalOnMissingBean` checks.
2015-09-23 21:31:33 -07:00
izeye efb699de60 Remove duplicate `@ConditionalOnMissingBean` checks. 2015-09-23 21:30:47 -07:00
Ivan Chen 926b40e46c Delete duplicate application.properties
Closes gh-4004
2015-09-23 21:29:28 -07:00
Phillip Webb 2e6bbd3538 Merge pull request #4010 from tbadie/master
* pr/4010:
  Fix synchronization issue in OpenTSDBMetricWriter
2015-09-23 21:27:55 -07:00
Thomas Badie 2fd1cacbf3 Fix synchronization issue in OpenTSDBMetricWriter
Closes gh-4010
2015-09-23 21:27:14 -07:00
Phillip Webb c629813165 Rationalize Spring Data auto-configurations
Relocate several auto-configuration classes to `...autoconfigure.data`
to make it clearer that they are Spring Data specific.

Also moved `EntityManagerFactoryBuilder` to `spring-boot` since it is
generally useful and doesn't need to be directly tied to the
auto-configuration module.

Fixes gh-4002
2015-09-22 11:52:23 -07:00
Andy Wilkinson e9349ee53f Suppress warning from M2E by explicitly ignoring invoker plugin 2015-09-22 14:02:41 +01:00
Andy Wilkinson 051ebf3fac Polishing: fix a number of compiler warnings reported by Eclipse 2015-09-22 13:30:07 +01:00
Andy Wilkinson a38f01f9e5 Fix compile errors in Eclipse (STS 3.6.4) in UserInfoTokenServicesTests 2015-09-22 12:54:39 +01:00
Andy Wilkinson d10dd13714 Fix deprecation warning in ConfigurationPropertiesReportEndpoint 2015-09-22 12:43:15 +01:00
Andy Wilkinson 1be4394855 Add lifecycle mapping for checkstyle plugin to keep Eclipse happy 2015-09-22 12:42:44 +01:00
Andy Wilkinson 262dbc85e8 Merge branch '1.2.x' 2015-09-22 10:48:16 +01:00
Andy Wilkinson ecf7baf917 Merge branch '1.2.x' 2015-09-22 10:41:26 +01:00
Andy Wilkinson 31705982a0 Upgrade to Spring Social Twitter 1.1.1.RELEASE
Closes gh-3913
2015-09-22 10:35:09 +01:00
Phillip Webb 7ed1534c7b Exclude validation JARs from deployment tests
Exclude spring-boot-starter-validation since those jars are provided
by the container.
2015-09-21 16:46:57 -07:00
Phillip Webb 21de97da50 Make jackson-module-parameter-names optional
Update the spring-boot-autoconfigure POM so that
jackson-module-parameter-names is optional.

See gh-3804
2015-09-21 16:45:35 -07:00
Phillip Webb f2ce59c403 Polish 2015-09-21 15:04:22 -07:00
Phillip Webb 86daf44435 Add @Since tag 2015-09-21 14:43:41 -07:00
Andy Wilkinson 7f2be6ce27 Add auto-configuration for Jackson's parameter names module
The parameter names module allows users of Java 8 that have compiled
their code with the -parameters option to avoid the name for
annotations to map the json onto constructor and method parameters
with the names of the parameters being used instead.

This commit adds auto-configuration for the module that will only
be enabled when running on Java 8.

Closes gh-3804
2015-09-21 17:06:06 +01:00
Andy Wilkinson 6c59e75874 Update tests to align with changes made in 8094076
See gh-3900
2015-09-21 16:55:20 +01:00
Andy Wilkinson 80940764f6 Do not trigger a restart when a test class is changed
Previously, dev tools would restart the application when any .class
file changed. This included test classes. This commit updates the
default excludes to ignore any classes with a name that ends in 
Test.class or Tests.class.

Closes gh-3900
2015-09-21 16:22:47 +01:00
Andy Wilkinson c3e447c84c Order char encoding filter so it sets encoding before request is read
For the character encoding filter to work, it's vital that it sets
the request's encoding before any other filters attempt to read the
request. This commit updates the order of
OrderedCharacterEncodingFilter to be HIGHEST_PRECEDENCE and improves
the existing test to check that the ordering is as required.

Closes gh-3912
2015-09-21 15:32:53 +01:00
Andy Wilkinson 702b8d041f Remove code used for documentation generation from actuator-docs jar
Closes gh-3902
2015-09-21 15:20:21 +01:00
Andy Wilkinson 94a737638e Update launch script to specify -jar as last option
The recommended usage for the java executable is:

    java [-options] -jar jarfile [args...]

This commit updates the default launch script to match this recommended
usage by moving -jar to be the last option, after both the
disableJarChecking system property and any JAVA_OPTS.

Closes gh-3930
2015-09-21 14:51:03 +01:00
Andy Wilkinson 1ce0ba6171 Upgrade to Spring Social Twitter 1.1.1.RELEASE
Closes gh-3913
2015-09-21 14:19:40 +01:00
Phillip Webb d22d0683b2 Fixup build following release 2015-09-16 12:03:23 -04:00
Spring Buildmaster 9409c49c10 Next development version 2015-09-16 09:00:17 -07:00
Stephane Nicoll 9a8dcab1db Merge pull request #3967 from izeye/patch-40
* pr/3967:
  Polish Javadoc
2015-09-15 22:25:40 -04:00