Commit Graph

5536 Commits

Author SHA1 Message Date
Stephane Nicoll 4235df180e Polish
See gh-3792
2015-08-20 14:54:40 +02:00
Stephane Nicoll 6f3cc712bf Merge branch '1.2.x' 2015-08-20 14:48:31 +02:00
Stephane Nicoll 6869b0d987 Fix wrong imports on StringUtils
Closes gh-3792
2015-08-20 14:46:20 +02:00
Stephane Nicoll d6f3b4b887 Merge pull request #3793 from mmacaulay/patch-1
* pr/3793:
  Fix link to exec maven plugin
2015-08-20 14:25:00 +02:00
Matt MacAulay 0d2f644c50 Fix link to exec maven plugin
Closes gh-3793
2015-08-20 14:24:24 +02:00
Stephane Nicoll 53251a9f9c Add suffix dot on prefix only if necessary
Closes gh-3787
2015-08-20 10:43:12 +02:00
Stephane Nicoll 1466169dc0 Register ResourceUrlEncodingFilter only if necessary
Previously, `ResourceUrlEncodingFilter` was registered even if the
resource chain handling was disabled (which is the default).

We now take care of registering it only if the resource chain handling is
enabled.

Closes gh-3353
2015-08-20 10:33:04 +02:00
Martin Lippert 678f36cfef configure JRE that is different from compiler target level 2015-08-19 17:00:38 +01:00
Stephane Nicoll 7c0c953f81 Add value alias for SpringApplicationConfiguration
Given that Spring Boot uses java config accross the board, a new `value`
attribute is now aliased to the existing `classes` attribute such that
one could write the following:

@SpringApplicationConfiguration(MyConfig.class)
public class MyTest {}

Closes gh-3635
2015-08-19 17:09:34 +02:00
Stephane Nicoll 87d214e61d Upgrade to Spring Framework 4.2.1.BUILD-SNAPSHOT 2015-08-19 14:53:49 +02:00
Stephane Nicoll 35c92348ae Document Velocity view resolver customization
Changing the velocity view resolver to a VelocityLayoutViewResolver seems
a common use case so it has now a dedicated section in the relevant how
to.

Closes gh-3732
2015-08-19 14:32:31 +02:00
Stephane Nicoll 3c91781bee Add additional exclude property
The default value of `spring.devtools.restart.exclude` is quite long and
any override requires to copy/paste it to add additional exclusions. To
avoid that, a new `spring.devtools.restart.additional-exclude` property
has been added.

Both properties are now used to compute the full list of exclusions that
is used by PatternClassPathRestartStrategy.

Closes gh-3774
2015-08-19 14:08:05 +02:00
Andy Wilkinson 23693c3f6a Update contribution guidelines to describe how we use GitHub issues 2015-08-19 12:15:08 +01:00
Stephane Nicoll 0d7ee8a2df Fix default value of restarter meta-data
Closes gh-3773
2015-08-19 11:59:05 +02:00
Andy Wilkinson 8067a53682 Prevent run failures in tests from polluting LoggerContext 2015-08-17 20:37:00 +01:00
Andy Wilkinson 9e88dced88 Update devtools to customise environment before app context is refreshed
Prior to this commit, the devtools used bean factory post processors to
configure the environment with custom, development-time properties. This
meant that the environment was configured as part of the application
context being refreshed. Crucially, this happened after any property
conditions were evaluated making it impossible for the devtools to
change the default auto-configuration behaviour for a bean or
configuration class that was conditional on a property.

This commit moves the configuration of the environment into an
ApplicationListener that listens for the
ApplicationEnvironmentPreparedEvent which is published as soon as the
Environment has been prepared and before the application context is
refreshed.

Closes gh-3726
2015-08-17 20:03:48 +01:00
Andy Wilkinson e370b592d6 Introduce defined extension point for modifying the environment
The commit introduces a new extension point, EnvironmentPostProcessor,
that can be implemented by classes that want to modify the
environment. Implementations of EnvironmentPostProcessor are loaded
via spring.factories and called in response to the
ApplicationEnvironmentPreparedEvent. Application listeners that wish
to work with the post-processed environment can continue to listen
to ApplicationEnvironmentPreparedEvent and order themselves to
run after EnvironmentPostProcessingApplicationListener.

Existing ApplicationListeners that modify the environment have,
where possible, been updated to implement EnvironmentPostProcessor
instead.

Closes gh-3737
2015-08-17 20:03:16 +01:00
Stephane Nicoll 2f862cfb92 Revert upgrade to Spring Framework 4.2.1 snapshots 2015-08-17 18:33:36 +02:00
Stephane Nicoll a6f8586270 Merge branch '1.2.x'
Conflicts:
	spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfiguration.java
2015-08-17 10:15:52 +02:00
Stephane Nicoll 11b82cc6fe Properly guard DB health indicator
The DataSource health indicator uses `JdbcTemplate` behind the scenes
but nothing was checking that it is actually available.

`DataSourcesHealthIndicatorConfiguration` is now disabled if
`spring-jdbc` is not on the classpath.

Fixes gh-3765
2015-08-17 10:08:07 +02:00
Stephane Nicoll 3b3a569bc0 Merge pull request #3721 from joshthornhill/patch-3
* pr/3721:
  Fix typo
2015-08-15 17:56:19 +02:00
Josh Thornhill c13622ea29 Fix typo
Closes gh-3721
2015-08-15 17:55:53 +02:00
Stephane Nicoll d1f7da9797 Merge pull request #3752 from mxab/master
* pr/3752:
  Fix table layout
2015-08-15 17:35:34 +02:00
Max Bruchmann 750b354341 Fix table layout
Closes gh-3752
2015-08-15 17:35:08 +02:00
Stephane Nicoll 64d56cf425 Fix doc glitch 2015-08-15 17:31:24 +02:00
Stephane Nicoll 1659f628d0 Upgrade to Spring Framework 4.2.1.BUILD-SNAPSHOT 2015-08-15 09:28:55 +02:00
Andy Wilkinson 48ae39d7e3 Merge branch '1.2.x' 2015-08-14 18:10:35 +01:00
Andy Wilkinson 190f8a7e0a Upgrade Travis configuration to run on new infrastructure
Closes gh-3760
2015-08-14 18:08:48 +01:00
Andy Wilkinson 4e3411ac59 Add dependency management for org.skyscreamer:jsonassert
Closes gh-3751
2015-08-14 17:49:17 +01:00
Andy Wilkinson a38bdd92c2 Upgrade to Reactor and Reactor Spring 2.0.5.RELEASE
Closes gh-3756
2015-08-14 17:43:40 +01:00
Stephane Nicoll 73ee6652fd Use project location to infer the artifactId
On start.spring.io, if you customize the artifactId it creates a zip file
with the same name. The `spring init` command did not have a similar
shortcut.

This commit updates the request to customize the artifactId if none is
set and a custom location was specified. Just as we check for the
presence of a dot to figure out if we have to extract the archive or not,
we check for it to generate an artifactId without an extension.

In practice, `spring init foo` creates a foo directory with a project
whose artifactId is `foo` and `spring init foo.zip` stores a foo.zip
file with the same project (i.e. the artifactId is `foo`).

Closes gh-3714
2015-08-14 17:10:21 +02:00
Stephane Nicoll 58d0776abe Polish 2015-08-14 14:08:27 +02:00
Stephane Nicoll d1a4d6958a Document spring.datasource.name
The `spring.datasource.name` property was hidden behind the 'name'
attribute of the Tomcat connection pool (since we are mapping all
datasource implementations on the `spring.datasource` namespace.

This commit replace the injected value by hand with the use of the
regular `DataSourceProperties`. That way, we generate proper meta-data
for it as well.

Closes gh-3755
2015-08-14 14:07:38 +02:00
Stephane Nicoll 2d62e1fc89 Add a property to configure the connection pool
A new `spring.datasource.type` property can now be used to configure the
connection pool implementation to use (rather than only relying on Boot's
preferences).

Closes gh-3705
2015-08-14 13:30:14 +02:00
Stephane Nicoll e4b81b173c Polish 2015-08-14 13:21:15 +02:00
Stephane Nicoll 960d6eadba Spring Boot starter section
Improve the documentation to explain the necessary steps to create a
custom Spring Boot starter. In particular, provide more details regarding
naming conventions.

Closes gh-2537
See gh-2927
2015-08-14 10:51:38 +02:00
Stephane Nicoll 78769444d2 Merge pull request #3750 from eddumelendez/gh-3749
* pr/3750:
  Polish
  Add fallbackToSystemLocale configuration key
2015-08-14 09:24:35 +02:00
Stephane Nicoll 4e0f99ed8b Polish
Closes gh-3750
2015-08-14 09:24:24 +02:00
Eddú Meléndez 74e1a1c940 Add fallbackToSystemLocale configuration key
Allow to configure the `fallbackToSystemLocale` attribute of
`MessageSource` via configuration.

Closes gh-3749
2015-08-14 09:09:40 +02:00
Andy Wilkinson c15a670c6d Workaround bizarre compiler problem 2015-08-13 15:46:38 +01:00
Andy Wilkinson 51dd806a98 Detect ConfigurableWebBindingInitializer bean and register with MVC
Previously, to use a custom ConfigurableWebBindingInitializer, it was
necessary to extend WebMvcConfigurationSupport and override
getConfigurableWebBindingInitializer. This had the unwanted
side-effect of switching off the auto-configuration of Spring MVC.

This commit updates the auto-configuration to look for a
ConfigurableWebBindingInitializer bean and register it with Spring
MVC.

Closes gh-2526
2015-08-13 15:20:59 +01:00
Martin Lippert 511c6d39fa Replace ignore with lifecycle mapping to smooth import into Eclipse
Closes gh-3516
2015-08-13 13:24:15 +01:00
Craig Andrews 2e0e2a3d60 Add more Jackson dependencies to spring-boot-dependencies
Add:

 - jackson-datatype-hibernate4
 - jackson-datatype-hibernate5
 - jackson-datatype-jdk7
 - jackson-module-parameter-names

Closes gh-3727
2015-08-13 13:06:44 +01:00
izeye eab7eff047 Polish documentation
Closes gh-3738
2015-08-13 12:58:53 +01:00
Andy Wilkinson fbe2e470f0 Ignore case when filtering out properties based on target name
Previously, PropertiesConfigurationFactory would only create a
DefaultPropertyNamePatternsMatcher that ignored case if it was
ignoring unknown fields. If the binding had a target name and
unknown fields were not being ignored the matcher would consider the
case when finding matches. This meant that SERVER_PORT would not being
to ServerProperties.port as SERVER did not match the target name,
server.

This commit updates PropertiesConfigurationFactory to use a
case-ignoring DefaultPropertyNamePatternsMatcher when binding with
a target name. The tests have also been updated to test binding both
with and without ignoring case and using either Properties or
PropertySources. The above-described matching is only performed
against PropertySources and the bug only occurred when using a target
name, making it important to test all combinations.

Closes gh-3745
2015-08-13 12:51:52 +01:00
Stephane Nicoll 398d06e326 Remove useless code
The target attribute is effectively checked for null beforehand so this
additional defensive check can be removed.

Closes gh-3725
2015-08-12 11:13:03 +02:00
Dave Syer 56115b9baa Fix broken test (use web app context) 2015-08-12 08:43:13 +01:00
Dave Syer 84a3e3827b Ensure tomcat on the classpath does not imply web application 2015-08-11 09:34:20 +01:00
Stephane Nicoll 9d2d34216b Remove references to endpoints.hal
See gh-3696
2015-08-11 09:14:40 +02:00
Andy Wilkinson a4bfcb9b94 Merge branch '1.2.x' 2015-08-10 20:32:09 +01:00