Commit Graph

5621 Commits (d02bae2d82c6254f3676735255585c9042291062)
 

Author SHA1 Message Date
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
9 years ago
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
9 years ago
Stephane Nicoll 2f862cfb92 Revert upgrade to Spring Framework 4.2.1 snapshots 9 years ago
Stephane Nicoll a6f8586270 Merge branch '1.2.x'
Conflicts:
	spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfiguration.java
9 years ago
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
9 years ago
Stephane Nicoll 3b3a569bc0 Merge pull request #3721 from joshthornhill/patch-3
* pr/3721:
  Fix typo
9 years ago
Josh Thornhill c13622ea29 Fix typo
Closes gh-3721
9 years ago
Stephane Nicoll d1f7da9797 Merge pull request #3752 from mxab/master
* pr/3752:
  Fix table layout
9 years ago
Max Bruchmann 750b354341 Fix table layout
Closes gh-3752
9 years ago
Stephane Nicoll 64d56cf425 Fix doc glitch 9 years ago
Stephane Nicoll 1659f628d0 Upgrade to Spring Framework 4.2.1.BUILD-SNAPSHOT 9 years ago
Andy Wilkinson 48ae39d7e3 Merge branch '1.2.x' 9 years ago
Andy Wilkinson 190f8a7e0a Upgrade Travis configuration to run on new infrastructure
Closes gh-3760
9 years ago
Andy Wilkinson 4e3411ac59 Add dependency management for org.skyscreamer:jsonassert
Closes gh-3751
9 years ago
Andy Wilkinson a38bdd92c2 Upgrade to Reactor and Reactor Spring 2.0.5.RELEASE
Closes gh-3756
9 years ago
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
9 years ago
Stephane Nicoll 58d0776abe Polish 9 years ago
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
9 years ago
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
9 years ago
Stephane Nicoll e4b81b173c Polish 9 years ago
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
9 years ago
Stephane Nicoll 78769444d2 Merge pull request #3750 from eddumelendez/gh-3749
* pr/3750:
  Polish
  Add fallbackToSystemLocale configuration key
9 years ago
Stephane Nicoll 4e0f99ed8b Polish
Closes gh-3750
9 years ago
Eddú Meléndez 74e1a1c940 Add fallbackToSystemLocale configuration key
Allow to configure the `fallbackToSystemLocale` attribute of
`MessageSource` via configuration.

Closes gh-3749
9 years ago
Andy Wilkinson c15a670c6d Workaround bizarre compiler problem 9 years ago
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
9 years ago
Martin Lippert 511c6d39fa Replace ignore with lifecycle mapping to smooth import into Eclipse
Closes gh-3516
9 years ago
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
9 years ago
izeye eab7eff047 Polish documentation
Closes gh-3738
9 years ago
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
9 years ago
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
9 years ago
Dave Syer 56115b9baa Fix broken test (use web app context) 9 years ago
Dave Syer 84a3e3827b Ensure tomcat on the classpath does not imply web application 9 years ago
Stephane Nicoll 9d2d34216b Remove references to endpoints.hal
See gh-3696
9 years ago
Andy Wilkinson a4bfcb9b94 Merge branch '1.2.x' 9 years ago
Andy Wilkinson 4f0f51b5ed Upgrade to Spring Web Services 2.2.2.RELEASE
Closes gh-3423
9 years ago
Andy Wilkinson 2ae8a021f9 Merge branch '1.2.x' 9 years ago
Andy Wilkinson a2f4c1cc4a Add support for configuring allowSessionOverride via the environment
This commit adds support for using the environment to configure the
Freemarker and Velocity view resolvers to allow session overrides.

Closes gh-3410
9 years ago
Andy Wilkinson c164065a38 Merge branch '1.2.x' 9 years ago
Andy Wilkinson f9a775518f Upgrade to Spring Batch 3.0.5.RELEASE
Closes gh-3421
9 years ago
Andy Wilkinson dad0574fd5 In absence of HAL browser, serve browsers JSON from actuator entry point
Following the changes made to combines the /links and /hal endpoints
into a single /actuator endpoint, a web browser accessing /actuator
would receive a 406 response if HAL browser was not on the classpath.

This commit updates the /actuator main entry point so that it will
serve JSON to a web browser when HAL browser is not on the classpath.

The actuator's embedded documentation has also been updated to reflect
the recent changes.

Closes gh-3696
9 years ago
Stephane Nicoll 3763eda64e Merge branch '1.2.x' 9 years ago
Stephane Nicoll 1ee31e73d3 Avoid NPE if @ConfigurationProperties is not present
The annotation processor detects `@ConfigurationProperties` bean or
method definition and merges manual meta-data. The former step will fail
with a NPE if the annotation is not present on the classpath. This could
happen if the annotation processor is added to a module that is not
actually using Spring Boot.

We now have a defensive check that skips that steps but still attempts to
merge manual meta-data if present.

Closes gh-3720
9 years ago
Andy Wilkinson 25709385e6 Update Hypermedia samples following /hal and /links being combined
See gh-3696
9 years ago
Stephane Nicoll 04b1de2d1d Add package-name option for spring init
For some reason, we forgot to add an attribute to customize the package
name when using spring init. This is now the case.

Closes gh-3716
9 years ago
Dave Syer 25ac258d22 Clarify plugin documentation for requiresUnpack 9 years ago
Andy Wilkinson 1e4c972c3d Fix customJodaDateTimeFormat to specify time zone when creating Date
See gh-3569
9 years ago
Dave Syer 68af0a73ec Clarify documentation in a few areas
Fixes gh-3527
9 years ago
Andy Wilkinson a62ec1028c Upgrade to Jackson 2.6.1
Closes gh-3569
9 years ago
Andy Wilkinson 58db5a3889 Combine /links and /hal into a single /actuator endpoint
This commit provides a single endpoint, /actuator, that serves HTML
(the HAL browser) or JSON depending on the request’s accept header
that enables discovery of all of the actuator’s other endpoints.

When the management context path is configured, the /actuator endpoint
moves to the configured path, e.g. if the management context path is
set to /management, the actuator endpoint will be available from
/management.

Closes gh-3696
9 years ago