Commit Graph

4045 Commits (e42fa79f7bbec1ed47e234c6825956357bc93f4d)
 

Author SHA1 Message Date
Rob Winch e42fa79f7b Fix fragile AuthenticationManagerConfiguration
Fixes gh-2474
10 years ago
Andy Wilkinson b8babd4eb4 Polish documentation on @ConfigurationProperties getters and setters
- Correct typo (coercable -> coercible)
 - Update description to reflect that Spring 4.1.5 supports the
   expansion of array properties and and a test that verifies the
   behaviour
10 years ago
Andy Wilkinson d87bf707a7 Merge branch '1.1.x' 10 years ago
Andy Wilkinson 11e0444814 Upgrade to Spring Security JWT 1.0.3.RELEASE
Closes gh-2304
10 years ago
Andy Wilkinson 99a0661565 Upgrade to Spring Batch 3.0.3.RELEASE
Closes gh-2503
10 years ago
Andy Wilkinson 4840417cd9 Upgrade to mongo-java-driver 2.12.5
Closes gh-2502
10 years ago
Andy Wilkinson 3b8c9418b1 Upgrade to JDom 2.0.6
Closes gh-2501
10 years ago
Andy Wilkinson 8c534547c9 Upgrade to Groovy 2.3.9
Closes gh-2500
10 years ago
Andy Wilkinson cdc2008146 Upgrade to AspectJ 1.8.5
Closes gh-2499
10 years ago
Andy Wilkinson 3f285d1bf0 Upgrade to Tomcat 7.0.59
Closes gh-2498
10 years ago
Andy Wilkinson 6a93fa1dd0 Upgrade to Jackson 2.3.5
Closes gh-2497
10 years ago
Stephane Nicoll 34ede2f31f Add Version and VersionRange utilities
Parse a version using our version format or any version that complies
with Major.Minor.Patch. Also add a VersionRange utility that can
determine if a given version is withing that range.

Closes gh-2494
10 years ago
Stephane Nicoll e8e39e4bcf polish 10 years ago
Dave Syer 5efdb85876 Enhance note about Java Bean getters and setters 10 years ago
Dave Syer e541e139a2 Add note about Java Bean getters and setters
Apparently some users are unclear that setters and getters are
mandatory for @ConfigurationProperties. This should clear it up.
10 years ago
Stephane Nicoll 2843744190 Merge pull request #2320 from joshiste/datasourceMetrics-fix
* datasourceMetrics-fix:
  Fix for empty datasource-name in metrics
10 years ago
Johannes Stelzer 05e388012d Fix for empty datasource-name in metrics
If there is more than one DataSource and the non-primary bean-name is
'datasource' an incorrect metric name is chosen.

The metrics are named datasource.active and not datasource.xxx.active. To
avoid this, the shortening of the bean-name only occurs if the bean-name
is longer than 'datasource'.

See gh-2320
10 years ago
Andy Wilkinson a8726c4ae1 Merge branch '1.1.x' 10 years ago
Andy Wilkinson d7ae0f3b06 Ensure that management endpoints with nested paths are secured
Previously each endpoint was secured for path, path/, and path.*.
This meant that a request to path/foo was not secured. This commit
secures path/** to ensure that requests to a nested endpoint path are
also secured.

Fixes gh-2476
10 years ago
Andy Wilkinson a4b4b850d5 Remove duplicate deployment tests
Closes gh-2472
10 years ago
Andy Wilkinson 201fb5e534 Make Joda DateTime serialization format configurable
We allow the serialization format of dates to be configured using
spring.jackson.date-format. However, this property only applies to
java.util.Date instances and has no effect on a Joda DateTime.

This commit updates our auto-configuration for Jackson to allow
the format string that is used to  serialize a Joda DateTime to be
configured. A new property, spring.jackson.joda-date-time-format has
been introduced. When configured, it is used to configure the
serialization format for a Joda DateTime. When it is not configured,
we fall back to using spring.jackson.date-format. If this fails,
either because the format string is incompatible (unlikely) or because
the user's configured the fully-qualified name of a DateFormat class,
a warning is logged encouraging the use of
spring.jackson.joda-date-time-format.

Fixes gh-2225
10 years ago
Andy Wilkinson f11bcb9495 Register Module beans with Jackson2ObjectMapperBuilder
Prior to this commit, Module beans were registered with all
ObjectMapper beans, but were not registered with the auto-configured
Jackson2ObjectMapperBuilder. This meant that any ObjectMapper created
with the builder but not exposed as a bean would not have the Module
beans registered with it. One such ObjectMapper is the one used by the
auto-configured MappingJackson2XmlHttpMessageConverter. This caused
XML (de)serialization to be different to JSON (de)serialization.

This commit updates JacksonAutoConfiguration to register all of the
application context's Module beans with the auto-configured
Jackson2ObjectMapperBuilder. This ensures consistent configuration
of any ObjectMapper that's created using the builder, irrespective of
whether or not that ObjectMapper is also exposed as a bean, and
also ensures that (de)serialization of JSON and XML is consistent.

See gh-2327
10 years ago
Dave Syer 0899ffdadf Add realm name to 401 responses from basic auth
Since the BasicAuthenticationEntryPoint does its own
challenge when authentication fails, we need to add that
entry point in the SpringBootWebSecurityConfiguration
explicitly.

Fixes gh-2483
10 years ago
Dave Syer 12724bf332 Fix ordering of keys in PropertySourcesPropertyValues
Since @ConfigurationProperties binding uses a single instance of
PropertySourcesPropertyValues per bean, there doesn't seem to be
any issue with using a normal LinkedHashMap. Then the order
passed in as PropertySources will be preserved.

Fixes gh-2487
10 years ago
Andy Wilkinson 0ef3de4d82 Document how to disable auto registration of a Servlet or Filter bean
Closes gh-2173
10 years ago
Andy Wilkinson b183309728 Stop a BeanPostProcessor from preventing config of packages to scan
Previously, if a BeanPostProcessor bean was declared in a configuration
class that depended on the persistence context, packages to scan would
not be configured on the LocalContainerEntityManagerFactoryBean. This
was due to the BeanPostProcessor bean triggering the early instantiation
of the LCEMFB before EntityScanBeanPostProcessor, the BeanPostProcessor,
that applies the @EntityScan configuration, had been given a chance to
configure it.

This commit updates EntityScanBeanPostProcessor to implement Ordered
with an order of zero. This ensures that its ordering is predictable
and that it will be driven before any unordered BeanPostProcessor. This
means that, unless the user has specifically ordered their
BeanPostProcessor to run before EntityScanBeanPostProcessor, 
LCEMFB’s packages to scan will be configured as expected.

Fixes gh-2478
10 years ago
Stephane Nicoll 1035e5b029 Expose RepositoryRestMvcBootConfiguration
If an application defines a custom RepositoryRestMvcConfiguration, all
Spring Boot defaults are lots. While this sounds sensible, it can be
confusing as Spring Boot exposes properties (`spring.data.rest.*`) that
are no longer honored.

RepositoryRestMvcBootConfiguration is now public and can be used as an
extension point for those who need to customize the Spring Data REST
configuration and keep boot's specific defaults.

Fixes gh-2392
10 years ago
Andy Wilkinson 11b7fd832d Report non-matching outer class conditions
Update ConditionEvaluationReport so that, whenever a negative outcome
is added for a source, any existing outcomes for inner classes of that
source are updated with a non-matching outcome that indicates that the
outer configuration did not match.

Conditions are evaluated in two phases; PARSE_CONFIGURATION first and
REGISTER_BEAN second. If a parent class’s conditions match in
PARSE_CONFIGURATION then its inner classes will have their
PARSE_CONFIGURATION conditions evaluated. If they all match, the inner
class will be reported as a positive match in the auto-configuration
report even if the outer class does not match as a result of the
subsequent evaluation of a REGISTER_BEAN condition.

Fixes gh-2122
10 years ago
Phillip Webb 636898f9ad Polish 10 years ago
Andy Wilkinson 5922cfa41f Avoid use of SimpleNamingContextBuilder as it pollutes JVM’s JNDI config
Closes gh-2397
10 years ago
Andy Wilkinson 82d1e61ab1 Prevent attempt to export MBean for DataSource retreived from JNDI
Tomcat 8's default DataSource implemention is an MBean. Previously,
when such a DataSource was consumed from JNDI and an MBeanExporter had
been auto-configured an attempt would be made to export this MBean to
the MBean server. This would fail due to Tomcat having already
registered the MBean.

This commit updates JndiDataSourceAutoConfiguration to instruct the
MBeanExporter (if there is one) not to export a DataSource MBean
that's been retrieved from JNDI. The assumption is that any MBean in
JNDI will have already been registered with the MBean server by the
same infrastructure that registered it with JNDI.

Fixes gh-2397
10 years ago
Andy Wilkinson b40f689e1d Merge branch '1.1.x'
Conflicts:
	spring-boot-dependencies/pom.xml
10 years ago
Andy Wilkinson 6aaa5ee933 Upgrade to CRaSH 1.3.1
Closes gh-2425
10 years ago
Stephane Nicoll 23d7a6bd8f Merge pull request #2469 from izeye/application-properties
* application-properties:
  Improve doc for application.properties.
10 years ago
izeye 319663a628 Improve doc for application.properties. 10 years ago
Andy Wilkinson b4cb7a35c9 Document spring.http.converters.preferred-json-mapper
See gh-2247
10 years ago
Andy Wilkinson b39ecdf006 Rename preferred-mapper property so its clear it only applies to JSON
preferred-mapper has been renamed to preferred-json-mapper to make it
clear that it only affects the JSON mapper and that the XML mapper
that will be used (if any) is unaffected

See gh-2247
10 years ago
Andy Wilkinson 230048ae8b Prefer Jackson unless user explicity states preference for Gson
This commit rewords the changes made in d718a80 so that simply adding
Gson to the classpath isn't sufficient to stop Jackson being used
for HTTP JSON mapping. To use Gson, the user must now either remove
Jackson from the classpath (not an option if they also wish to use
the Actuator) or configure the spring.http.converters.preferred-mapper
property with a value gson.

Closes gh-2247
10 years ago
Andy Wilkinson e5d653dbd4 Update to Spring AMQP 1.4.3.RELEASE
Closes gh-2452
10 years ago
Andy Wilkinson f64081872c Merge branch '1.1.x' 10 years ago
Andy Wilkinson 9212574191 Upgrade to Spring AMQP 1.3.9.RELEASE
Closes gh-2453
10 years ago
Andy Wilkinson aca47ab67e Allow FaviconConfiguration to be disabled
Setting spring.favicon.enabled to false will now disable the
/**/favicon.ico handler mapping.

Closes gh-2377
10 years ago
Andy Wilkinson d718a80316 Make it easier to use Gson and the Actuator at the same time
Previously the recommendation when a user wanted to use Gson was to
exclude Jackson from the classpath and add Gson. This worked fine until
the user also want to use the Actuator which requires Jackson. To get
over this hurdle the user could leave Jackson on the classpath and
perform their own HttpMessageConverter configuration and register a
GsonHttpMessageConverter instead of or before any Jackson-based
converter. A little complicated, but it worked.

This commit makes things easier by updating the auto-configuration for
HTTP message converters to prefer Gson when both Gson and Jackson are
on the classpath, i.e. in the presence of both, a
GsonHttpMessageConverter will be auto-configured and a
MappingJackson2HttpMessageConverter won’t be. This allows an
application to easily use Gson while allowing the Actuator to continue
to use Jackson.

Closes gh-2247
10 years ago
Andy Wilkinson 68c7c65d52 Configure SnakeYAML so the timestamp-like strings do not become Dates
By default, SnakeYAML will convert a timestamp-like string into a
java.util.Date. This differs to properties file-based configuration
where the values are always strings. Dates are problematic as the
round trip (string -> Date -> string) can change the value. For example,
“2015-01-27” becomes “Tue Jan 27 00:00:00 GMT 2015”.

This commit updates YamlPropertySourceLoader to use a Yaml with a
custom Resolver subclass that suppresses the addition of the implicit
resolver for timestamps. Supressing the addition of the unwanted
resolver, rather than overriding addImplicitResolvers and registering
the resolvers that we do want, ensures that we get all of the other
default Resolvers in their default order.

Fixes gh-2422
10 years ago
Andy Wilkinson 54e90c03fc Polish the javadoc in spring-boot-cli
Add missing @param and @return elements
10 years ago
Andy Wilkinson 17f05467bc Document IDEA’s quirky classpath ordering and its effect on templates
Closes gh-2319
10 years ago
Phillip Webb 8e398dc6a7 Polish Javadoc
Update Javadoc to add missing @return and @param elements.
10 years ago
Andy Wilkinson e489ab9b29 Update docs to clarify ordering for profile-specific properties
Closes gh-2404
10 years ago
Andy Wilkinson a88f27168a Add support to the Gradle plugin for disabling direct use of resources
The Maven plugin allows spring-boot:run to be configured so that
resources are loaded from their output location rather than from
src/main/resources. This commit adds an equivalent configuration
option to the Gradle plugin. To disable source resources from being
added to the classpath in place of those in the output location
the configure the bootRun tasks like this:

bootRun {
	addResources = false
}

Closes gh-2431
10 years ago
Phillip Webb c02b99b257 Rename CodahaleMetricWriter
Deprecate CodahaleMetricWriter and create DropwizardMetricWriter to
reflect the renamed project.

Fixes gh-2442
10 years ago