Commit Graph

2548 Commits

Author SHA1 Message Date
Phillip Webb
47b00c086c Polish 2017-02-27 13:56:17 -08:00
Stephane Nicoll
0435f122d4 Rework JSR-303 validation exposure with Spring MVC
This commit improves the initial solution by actually overriding the
`mvcValidator` `@Bean`. This gives us more control as whether a custom
validator has been specified or not. We now wrap it regardless of it
being custom or provided by auto-configuration.

Closes gh-8223
2017-02-27 19:09:29 +01:00
Stephane Nicoll
d8f62c46ad Prevent warning due to BPP dependency
`MethodValidationPostProcessor` requires a `Validator` so we need to flag
it as an infrastructure bean to prevent an additional log that indicates
it won't be post-processed.

We obviously don't want to post-process the `Validator` here so adding the
additional meta-data is a good idea anyway.

Closes gh-8422
2017-02-27 16:16:09 +01:00
Stephane Nicoll
4aa99b9531 Avoid exposing several javax.validaton.Validator beans
This commit makes sure that the Spring `Validator` used by the MVC
layer doesn't expose a JSR-303 contract, if any.

The default implementation of the `mvcValidator` is
`LocalValidatorFactoryBean`. While this object is exposed as a Spring
`Validator` only, its runtime capabilities expose that contract as well
as the standard `Validator` and `ValidatorFactory` ones.

Concretely, if an auto-configuration is checking if a
`javax.validation.Validator` bean is missing, the condition will match
since we only know about "advertized types": beans haven't been created
yet so we can't inspect their runtime capabilities. Since the condition
match, we will auto-configure a bean. At runtime though, we're no longer
ale to inject a `javax.validation.Validator` by type since two candidates
are available.

This commit introduces `SpringValidatorAdapterWrapper`, a wrapper class
on any `SpringValidatorAdapter` (`LocalValidatorFactoryBean` being one of
the available implementations) that only exposes the Spring contract.

Also, if a `javax.validation.Validator` bean is available, we will use it
for the MVC layer, rather than creating a new one.

Closes gh-8223
2017-02-24 11:01:42 +01:00
Andy Wilkinson
b034a505a5 Polish 0f42c5dd
- Apply standard code formatting
- Add class javadoc to MultipleResourceServerConfigurationTests
- Add missing @Override annotations
- Remove unused ExpectedException field
- Remove use of SpringApplicationBuilder from the tests
- Use @ImportAutoConfiguration to import auto-configuration
- Add assertions to verify that the orders haven't been changed
- Remove unnecessary mocking of EmbeddedServletContainerFactory

See gh-8347
2017-02-22 12:16:05 +00:00
Dave Syer
0f42c5dd94 Check there is only one ResourceServerConfiguration before modifying
Fixes gh-8347
2017-02-22 11:30:17 +00:00
Madhura Bhave
67810abd9e Match ResourceServerCondition if JWK config present
Closes gh-8350
2017-02-21 12:02:49 -08:00
Stephane Nicoll
43a534f4ca Polish contribution
Closes gh-8195
2017-02-20 14:03:07 +01:00
Mathieu Ouellet
fa8f0a6136 Add schema validation options for embedded LDAP
See gh-8195
2017-02-20 12:07:53 +01:00
Stephane Nicoll
f57ddff478 Remove dead code
Closes gh-8305
2017-02-16 10:04:57 +01:00
Madhura Bhave
b4134e239e Add autoconfiguration for JWKTokenStore
If `jwk.key-set-uri` is present.

Closes gh-4437
2017-02-15 12:05:29 -08:00
Andy Wilkinson
01729cc1d2 Merge branch '1.4.x' into 1.5.x 2017-02-15 17:25:07 +00:00
Andy Wilkinson
9e1238e286 Consider resource loader path when checking Groovy template availability
Closes gh-8304
2017-02-15 17:24:57 +00:00
Stephane Nicoll
a0ef61a27d Enable proxy target class for MethodValidationPostProcessor
Closes gh-8277
2017-02-14 10:32:26 +01:00
Andy Wilkinson
e0b355d313 Avoid ClassNotFoundException caused by areturn verification
The verifier's type checker is required to check that a type returned
from a method (an areturn instruction) is assignable to the method's
declared return type. When the return type is an interface, the JLS
states that it should be treated as java.lang.Object. This means that
no analysis of the type being returned is required and verification
passes. When the return type is a class, the type being returned must
be analyzed to ensure that it is compatible. This analysis causes the
return type to be loaded during verification.

Prior to this commit, BasicBatchConfigurer's
createAppropriateTransactionManager method had a return type of
AbstractPlatformTransactionManager and a branch that could return
a JpaTransactionManager. This caused the verifier to attempt to load
JpaTransactionManager so that it could check that it was assignable
to AbstractPlatformTransactionManager. This would fail when
spring-orm is not on the classpath as JpaTransactionManager could not
be loaded.

This commit updates BasicBatchConfigurer to change the return type
of createAppropriateTransactionManager so that it returns a
PlatformTransactionManager which is an interface. As described above,
this relaxes the verification of any areturn instructions in the
method and, in this particular case stops the verifier from trying to
load JpaTransactionManager.

Closes gh-8181
2017-02-13 12:36:17 +00:00
Andy Wilkinson
601c6aa305 Tidy up code formatting and address some compiler warnings 2017-02-09 13:48:55 +00:00
Stephane Nicoll
aa49468171 Allow to define a custom MessageRecoverer
This commit improves `SimpleRabbitListenerContainerFactoryConfigurer` to
use a custom `MessageConverter`. If such a bean is present, it is used
for the default factory that is auto-configured.

Closes gh-8194
2017-02-09 10:43:03 +01:00
Stephane Nicoll
8a59e88a9d Fix MongoDB CustomConversions bean name
This commit qualifies the `CustomConversions` bean name that the Mongo
auto-configuration might create. `CustomConversions` is a common pattern
in Spring Data and other stores are using the same name.

See https://jira.spring.io/browse/DATASOLR-362

Closes gh-8225
2017-02-08 14:29:33 +01:00
Stephane Nicoll
45a91fca31 Fix parsing of spring.autoconfigure.exclude property
This commits makes sure that `AutoConfigureImportSelector` properly
parses comma separated lists that contain additional spaces.

Closes gh-8220
2017-02-07 18:26:57 +01:00
Andy Wilkinson
e891fe0584 Merge branch '1.4.x' into 1.5.x 2017-02-07 17:06:33 +00:00
Andy Wilkinson
06017f688a Only auto-configure SpringSocialDialect for Thymeleaf 2
Previously, SocialWebAutoConfiguration would create a
SpringSocialDialect bean when SpringTemplateEngine was on the
classpath. This class exists in both Thymeleaf 2 and Thymeleaf 3 but
SpringSocialDialect is only compatible with Thymeleaf 2.

This commit updates the auto-configuration to require
SpringResourceResourceResolver to be on the classpath. This class
exists in Thymeleaf 2 but does not exist in Thymeleaf 3.

Closes gh-4858
2017-02-07 16:20:33 +00:00
Stephane Nicoll
130e0808d0 Merge branch '1.4.x' into 1.5.x 2017-02-07 16:31:02 +01:00
Stephane Nicoll
008aef6142 Document @LiquibaseDataSource feature
Closes gh-8214
2017-02-07 16:16:19 +01:00
Stephane Nicoll
e88bda4682 Avoid extra space if condition is empty
Previously, if a builder was created with an empty condition, an extra
space was added before the message. This commit checks for this
particular case and adds a space only when necessary.

Closes gh-8218
2017-02-07 11:59:49 +01:00
Stephane Nicoll
519a03ccda Polish 2017-02-06 14:08:10 +01:00
Johnny Lim
09998d1155 Fix ImportAutoConfigurationImportSelectorTests.determineImportsWhenUsingNonMetaWithClassesShouldBeSame()
Closes gh-8204
2017-02-06 14:05:26 +01:00
Johnny Lim
0adab8a2be Use logical 'and' instead of bitwise 'and'
Closes gh-8198
2017-02-06 10:35:13 +01:00
Johnny Lim
846994e498 Polish
Closes gh-8148
2017-02-01 09:07:47 +01:00
Spring Buildmaster
5c12500366 Next Development Version 2017-01-30 20:10:13 +00:00
Spring Buildmaster
a2696bf873 Next Development Version 2017-01-30 11:40:24 +00:00
Phillip Webb
fa6a138598 Refine ImportsContextCustomizer cache logic
Update `ImportsContextCustomizer` so that whenever possible a more
specific cache key is used.

Prior to this commit the customizer would generate a key based on *all*
annotations on the test class. This has repeatedly caused issues where
test classes that should have the same cache key did not due to
unrelated annotations.

A new `DeterminableImports` interface has been added that can be
implemented by `ImportSelector` and `ImportBeanDefinitionRegistrar`
implementations that are able to determine their imports early. The
existing `ImportAutoConfigurationImportSelector` and
`AutoConfigurationPackages` classes have been retrofitted with
this interface.

Fixes gh-7953
2017-01-27 17:19:52 -08:00
Andy Wilkinson
f34d309548 Formatting 2017-01-26 15:03:02 +00:00
Spring Buildmaster
ed1ce140c0 Next Development Version 2017-01-26 14:20:39 +00:00
Andy Wilkinson
f5445ba5ff Remove OnValidatorAvailableCondition as it is now redundant
Previously, Hibernate Validator would fail to initialize if it was
on the classpath but an EL implementation was not.
OnValidatorAvailableCondition protected against this scenario by
initializing the validator.

The Hibernate Validator shortcoming was addressed in eb222209
(gh-7598). As a result, checking for the precences of the
ValidationProvider META-INF/services resource is now sufficient to
auto-configure validation. This commit removes
OnValidatorAvailableCondition as it is no longer necessary.

Closes gh-8110
2017-01-26 10:42:46 +00:00
Andy Wilkinson
f823599d1f Replace @PostConstruct validation with setter validation
Closes gh-7579
2017-01-26 09:32:07 +00:00
Andy Wilkinson
37cf31f450 Upgrade to Couchbase Java Client 2.3.7
In version 2.3.6 and earlier, an attempt to create a Bucket or a
ClusterInfo would fail fast with a ConnectException in the cause of
the Couchbase server was done. In 2.3.7 this remains true for a
Bucket but is no longer the case for ClusterInfo. The latter now
retries for 75 seconds by default and when it eventually fails a
ConnectException is no longer part of the cause chain.

This commit makes the auto-configured ClusterInfo depend on the
auto-configured Bucket. This means that the Bucket is always created
before the ClusterInfo, thereby ensuring that things fail gracefully
with useful diagnostics when the server is unavailable.

Closes gh-8092
2017-01-25 14:55:28 +00:00
Stephane Nicoll
505e7f75ea Polish contribution
Closes gh-8089
2017-01-25 11:01:53 +01:00
dreis
d58f38f6f6 Use String.replace() with single char if possible
See gh-8089
2017-01-25 11:01:52 +01:00
Stephane Nicoll
551bfb2c60 Polish contribution
Closes gh-8103
2017-01-25 11:01:52 +01:00
Johnny Lim
32f9e90de5 Replace 'String.length() == 0' with 'String.isEmpty()'
See gh-8103
2017-01-25 11:01:52 +01:00
Johnny Lim
e0de28a1f7 Polish
Closes gh-8076
2017-01-24 13:22:22 +01:00
Phillip Webb
b0e06c30a0 Polish 2017-01-23 22:14:58 -08:00
Phillip Webb
de50cfa21e Make OnClassCondition an AutoConfigurationImportFilter
Update OnClassCondition to implement AutoConfigurationImportFilter so
that auto-configuration candidates can be filtered early. The
optimization helps to improve application startup time by reducing
the number of classes that are loaded.

See gh-7573
2017-01-23 22:14:58 -08:00
Phillip Webb
20a20b7711 Add AutoConfigurationImportFilter support
Add `AutoConfigurationImportFilter` strategy interface which can be used
to filter auto-configuration candidates before they are loaded.

See gh-7573
2017-01-23 22:14:57 -08:00
Phillip Webb
02641a8207 Optimize AutoConfigurationSorter
Optimize `AutoConfigurationSorter` by used properties generated by the
annotation processor whenever possible. The removes the need for each
candidate class to be ASM parsed just to access the order annotations.

See gh-7573
2017-01-23 22:14:57 -08:00
Phillip Webb
1cbda9bd60 Add AutoConfigurationMetadata abstraction
Add AutoConfigurationMetadata interface and a an internal loader that
allows easy access to data written by `spring-boot-configure-processor`.

See gh-7573
2017-01-23 22:14:57 -08:00
Madhura Bhave
ca435512c0 Introduce spring-boot-autoconfigure-processor
Add an annotation processor that generates properties files for certain
auto-configuration class annotations. Currently attribute values from
@AutoConfigureOrder, @AutoConfigureBefore, @AutoConfigureAfter and
@ConditionalOnClass annotations are stored.

The properties file will allow optimizations to be added in the
`spring-boot-autoconfigure` project. Primarily by removing the need
to ASM parse as many `.class` files.

See gh-7573
2017-01-23 22:14:56 -08:00
Phillip Webb
ccf964eb9a Optimize OnEnabledResourceChainCondition
Optimize OnEnabledResourceChainCondition by removing the DataBinder.
Properties are now read directly from the Environment.

See gh-7573
2017-01-23 18:29:23 -08:00
Phillip Webb
f8ded6de63 Don't use DataBinder to work out excludes
Update `AutoConfigurationImportSelector` so that exclude properties
are loaded without invoking a `DataBinder`. This optimization helps
to improve application startup time.

See gh-7573
2017-01-23 18:29:23 -08:00
Phillip Webb
cfd5a73b64 Don't call ReflectionUtils do deduce bean type
Update `OnBeanCondition` to no longer call `ReflectionUtils` when
deducing the bean method return type. Since Spring Framework 4.2
the return type has been directly available from `MethodMetadata`.

See gh-7573
2017-01-23 17:33:39 -08:00
Phillip Webb
996afafac6 Optimize OnClassCondition isPresent check
Update `OnClassCondition` to use its own `isPresent` rather than using
`ClassUtils.isPresent`. Using our own implementation saves a few cycles
since we never need to check for native types, and we don't support
nested class references specified in the non `$` notation.

See gh-7573
2017-01-23 17:33:28 -08:00
Phillip Webb
9650668291 Remove dependency from root to condition
Remove the slightly unusual dependency from the root autoconfigure
pacakge to `condition`. Prior to this commit the link was required in
ordere to populate the `ConditionEvaluationReport`. We now introduce
a `AutoConfigurationImportListener` strategy that allows anyone to
listen for AutoConfigurationImportEvents. The listener implementation
is now used to update the ConditionEvaluationReport.

Fixes gh-8073
2017-01-23 17:33:15 -08:00
Phillip Webb
b225b7f33a Rename EnableAutoConfigurationImportSelector
Rename EnableAutoConfigurationImportSelector to the more general
AutoConfigurationImportSelector since it's now used for more than
just the enable annotation.

The existing EnableAutoConfigurationImportSelector class remains in
a deprecated form so that it can be made package-private again in
Spring Boot 2.0.

Fixes gh-8072
2017-01-23 17:33:02 -08:00
Phillip Webb
2c89d9918f Relocate AutoConfigurations from root package
Move PropertyPlaceholder and MessageSource auto-configuration from the
root package to the `context` subpackage.

Fixes gh-8071
2017-01-23 17:32:45 -08:00
Phillip Webb
5703fb1515 Polish 2017-01-23 16:03:59 -08:00
Andy Wilkinson
9a79d32f4c Polishing 2017-01-23 10:10:45 +00:00
Andy Wilkinson
c86b844477 Remove @Component from ResourceServerFilterChainOrderProcessor
Closes gh-8050
2017-01-23 09:48:21 +00:00
Andy Wilkinson
a30fe9d9ff Update ServerPropertiesTests to tolerate changes in Tomcat 8.5.11
Closes gh-7360
2017-01-20 16:39:00 +00:00
Stephane Nicoll
915c959a28 Polish contribution
Closes gh-7600
2017-01-20 16:40:48 +01:00
Stephane Nicoll
b19d31e067 Use a random port with embedded Mongo by default
This commit improves the logic of the embedded Mongo support to use a
random port if no custom port has been specified. This doesn't change
the default if the embedded support isn't active.

Closes gh-8044
2017-01-20 16:40:06 +01:00
Andy Wilkinson
b900a3efc8 Update Actuator endpoints to use custom media type
Previously, the actuator's endpoints produced application/json and,
where appropriate, also consumed application/json. Without a custom,
versioned media type, it's impossible for us to make changes to the
endpoints without breaking clients.

This commit introduces a new media type,
application/spring-boot.actuator.v1+json, that is now produced by
default with application/json also being produced if requested.
Endpoints that consume JSON will now also accept content the uses
the new media type in addition to application/json.

Closes gh-7967
2017-01-20 15:31:22 +00:00
Phillip Webb
f3cd0ad22c Polish 2017-01-19 12:44:57 -08:00
Madhura Bhave
a5a382b8b1 Set AccessTokenConverter if available
Fixes gh-7091
2017-01-19 11:49:54 -08:00
Stephane Nicoll
e5e497ec3a Document @ImportAutoConfiguration#exclude
Closes gh-7862
2017-01-19 16:47:07 +01:00
Andy Wilkinson
f93d4a0cbf Add explicit aliases for exclude and excludeName on SpringBootApplication
Previously, SpringBootApplication relied on implicity aliasing of
exclude and excludeName that worked because the two attributes have
the same names as the equivalent attributes on
EnableAutoConfiguration.

This commit updates SpringBootApplication to make the aliases explicit
and also adds tests to EnableAutoConfigurationImportSelectorTests to
verify that the aliasing is working as intended.

Closes gh-7951
2017-01-19 12:29:46 +00:00
Stephane Nicoll
c41ff17dd7 Provide relevant default values for Enums
This commits adds manual metadata for enums that have a default value
since the annotation processor is not able to detect that yet.

Closes gh-7890
2017-01-19 13:19:13 +01:00
Phillip Webb
f42ebe428c Remove JSR-330 configuration annotations
Replace JSR-330 validation annotations from all internal
`@ConfigurationProperties` classes with standard Asserts.

Prior to this commit validation of our own configuration properties
would only occur when the user happens to have compliant JSR-330
implementation on their classpath.

See gh-7579
2017-01-18 20:51:35 -08:00
Phillip Webb
0a6456a748 Always use prefix config annotation attribute
Update use of `@ConfigurationProperties` to prefer the more explicit
`prefix` attribute, rather than `value`.

See gh-7579
2017-01-18 20:49:53 -08:00
Phillip Webb
43d432a527 Polish 2017-01-18 20:35:41 -08:00
Kazuki Shimizu
19e117c9cb Use constructor injection in DataSourceInitializer
Closes gh-7973
2017-01-17 16:13:10 +00:00
Kazuki Shimizu
bd6ae47d68 Prevent unnecessary debug log message creation
Closes gh-8001
2017-01-17 09:57:15 +01:00
Stephane Nicoll
d556e82cf7 Polish contribution
Closes gh-8004
2017-01-17 09:56:05 +01:00
Johnny Lim
acc36c076d Polish
See gh-8004
2017-01-17 09:53:50 +01:00
Stephane Nicoll
ada441bccc Allow custom override of user info OAuth2RestTemplate
Closes gh-5996
2017-01-16 16:09:32 +01:00
Stephane Nicoll
3e05329fd7 Order internal RepositoryRestConfigurer
This commit provides an order of zero for the RepositoryRestConfigurer
that is used internally to configure the `RepositoryRestConfiguration`. In
practice, an unordered `RepositoryRestConfigurer` will run after ours.

Closes gh-7981
2017-01-16 10:41:44 +01:00
Vedran Pavic
8f6a0e96fd Improve UserInfoTokenServices logging
Closes gh-7995
2017-01-16 10:08:28 +01:00
Andy Wilkinson
ae3434ba4c Merge branch '1.4.x' into 1.5.x 2017-01-13 18:45:50 -05:00
Andy Wilkinson
d2201d5284 Correct copyright dates and enforce that starting year is 2012
Closes gh-7923
2017-01-13 18:43:30 -05:00
Andy Wilkinson
66915a456a Merge branch '1.4.x' into 1.5.x 2017-01-13 07:29:17 -05:00
Andy Wilkinson
6f7d1de167 Remove redundant logic from OAuth2MethodSecurityConfiguration
Previously, OAuth2MethodSecurityConfiguration set the
PermissionEvaluator on the expression evaluator by looking in the
context for a PermissionEvaluator bean. This is unnecessary as
GlobalMethodSecurityConfiguration already does the same thing and does
so after the post-processor in OAuth2MethodSecurityConfiguration has
run. This commit removes the redundant logic and adds tests to check
that both the PermissionEvaluator and the RoleHierarchy are set use
beans in the context.

Closes gh-7979
2017-01-13 07:28:57 -05:00
Stephane Nicoll
5ee12a824f Fix assertion
See gh-7962
2017-01-12 09:09:42 -05:00
Andy Wilkinson
65025d8dab Enable Neo4J's open in view interceptor by default
Closes gh-7943
2017-01-10 17:04:51 -05:00
Stephane Nicoll
4523927e28 Polish 2017-01-06 12:44:32 +01:00
Phillip Webb
10de30ff11 Polish LDAP contribution
See gh-7733
2017-01-05 23:35:43 -08:00
Eddú Meléndez
6a84c369fd Add LDAP auto-configuration support
Add auto-configuration support for spring-ldap and spring-data-ldap.

See gh-2645
See gh-7733
2017-01-05 23:34:50 -08:00
Phillip Webb
565f75438e Polish 2017-01-05 11:04:07 -08:00
Dave Syer
fe344df9c5 Change default order of OAuth2 resource server filter chain
The default is now SecurityProperties.ACCESS_OVERRIDE_ORDER-1
(instead of 3), and the user can set it with
security.oauth2.resource.filter-order (as opposed to being hard
coded). The filter is provided by Spring OAuth2 so this change is
a BeanPostProcessor to call a setter on that object.

Fixes gh-5072
2017-01-05 11:58:36 +00:00
Phillip Webb
eb22220961 Upgrade to hibernate-validator 5.3.4
Upgrade to `hibernate-validator` 5.3.4 and introduce a new
`MessageInterpolatorFactory` that creates a suitable
`MessageInterpolator` (taking into account missing EL dependencies).

Rework `ConfigurationPropertiesBindingPostProcessor` and
`ValidationAutoConfiguration` to make use of the new factory.

Fixes gh-7598
2017-01-04 18:28:32 -08:00
Stephane Nicoll
0a26a4146b Make spring.session.store-type mandatory
This commit removes the automatic enabling of Redis as the Spring Session
store when it is available. This case is covered by a warning in `1.4.x`
that this commit removes as well.

Closes gh-7858
2017-01-04 12:42:04 +01:00
Stephane Nicoll
bf7271afa5 Upgrade to Couchbase Cache Client 2.1.0
As of 2.1 cache expiration times are to be set in seconds. This commit
migrates to the new method, yet keeping the milliseconds unit.

Closes gh-7824
2017-01-04 10:46:17 +01:00
Johnny Lim
f915ae197a Polish 2017-01-04 09:53:45 +01:00
Phillip Webb
76d5b913cd Polish 2017-01-03 14:43:24 -08:00
Stephane Nicoll
fe89af5e82 Polish contribution
Closes gh-7796
2017-01-03 11:33:57 +01:00
Eddú Meléndez
24c83d12da Autodetect spring.jpa.database from spring.datasource.url
Previously, property `spring.jpa.database` should be provided. This
commit allows to detect the database when `spring.datasource.url` is
provided.

Closes gh-7708
2017-01-03 11:24:58 +01:00
Phillip Webb
b27f4e23be Ignore @ImportAutoConfiguration exclude errors
Update `ImportAutoConfigurationImportSelector` to ignore excludes for
classes that aren't loaded. Since the import classes for tests tend to
be much more limited, the exception isn't really helpful.

Closes gh-6809
2016-12-30 12:53:59 -08:00
Phillip Webb
aacf5d660f Update copyright year for changed files 2016-12-30 11:53:51 -08:00
Phillip Webb
273beaa3ce Polish 2016-12-30 11:10:44 -08:00
Phillip Webb
f8acaae115 Merge branch '1.4.x' into 1.5.x 2016-12-30 11:00:06 -08:00
Phillip Webb
9ccf47398e Formatting 2016-12-30 10:56:44 -08:00
Kazuki Shimizu
85503fcbca Polishing log message and comment
Closes gh-7793
2016-12-30 16:04:38 +01:00
Stephane Nicoll
a90a73d1ac Merge branch '1.4.x' into 1.5.x 2016-12-30 16:04:00 +01:00
Stephane Nicoll
7b494cf319 Polish
See gh-7793
2016-12-30 15:59:17 +01:00
Stephane Nicoll
c230a21a8c Polish CacheManagerCustomizers
Closes gh-7792
2016-12-30 15:16:13 +01:00
Stephane Nicoll
2f3571f173 Defend against lambda transaction customizers
Update `CacheManagerCustomizers` to deal directly with
`ClassCastException` assuming that they are because a customizer is
implemented using a lambda.

Closes gh-7788
2016-12-30 15:16:13 +01:00
Stephane Nicoll
1fa8b1ac91 Defend against lambda transaction customizers
Update `CacheManagerCustomizers` to deal directly with
`ClassCastException` assuming that they are because a customizer is
implemented using a lambda.

Closes gh-7788
2016-12-30 14:19:03 +01:00
Phillip Webb
54aeff47a2 Add exclude support to @ImportAutoConfiguration
Update `@ImportAutoConfiguration` with support for an exclude attribute
that works in a similar way to `@EnableAutoConfiguration`.

Also update existing `@Test...` annotation with exclude attribute
aliases.

Fixes gh-6809
2016-12-30 00:31:30 -08:00
Phillip Webb
3c930347c5 Defend against lambda transaction customizers
Update `TransactionManagerCustomizers` to deal directly with
`ClassCastExceptions` assuming that they are because a customizer is
implemented using a lambda.

See gh-7561
2016-12-29 16:37:13 -08:00
Kazuki Shimizu
a7b77e6f9a Remove a nested TransactionProperties
Remove a few nested `TransactionProperties` that should have been
deleted in commit f22744c748.

See gh-7561
Closes gh-7786
2016-12-29 16:19:03 -08:00
Stephane Nicoll
7c25ccb0f3 Merge branch '1.4.x' into 1.5.x 2016-12-29 10:51:41 +01:00
Stephane Nicoll
1f5970c537 Fix auto-configuration class reference
Closes gh-7781
2016-12-29 10:49:19 +01:00
Stephane Nicoll
301b8bc611 Make the dependency to TransactionAutoConfiguration explicit
Closes gh-7773
2016-12-29 10:38:11 +01:00
Stephane Nicoll
4b641ca211 Polish
Closes gh-7561
2016-12-29 10:07:23 +01:00
Phillip Webb
f22744c748 Add support for TransactionManagerCustomizers
Add a `TransactionManagerCustomizer` callback interface that can be
used to customize auto-configured `PlatformTransactionManagers`.

Also update `...transaction.*` properties under a single unified
`spring.transaction...` key since the existing auto-configurations
would often share a transaction manager (the technology specific
transaction managers are `@ConditionalOnMissingBean` and may use
a manager created by a previous auto-configuration).

See gh-7561
2016-12-28 20:53:20 -08:00
Phillip Webb
601f7c0a69 Polish 2016-12-28 19:29:05 -08:00
Phillip Webb
8b69856fc9 Polish 2016-12-28 15:23:26 -08:00
Phillip Webb
3af5ae2a26 Polish ObjectProvider names
Consistently use the simple name for ObjectProvider parameter and
field names. For example:

  `ObjectProvider<Something> something`

rather than

  `ObjectProvider<Something> somethingProvider`
2016-12-27 15:04:06 -08:00
Phillip Webb
e0541d0f74 Polish 2016-12-27 14:48:44 -08:00
Stephane Nicoll
b24c8d04ba Allow to customize the auto-configured JestClient
This commit adds a `HttpClientConfigBuilderCustomizer` to further tune
the auto-configured `JestClient`.

Closes gh-7762
2016-12-27 11:12:23 +01:00
Stephane Nicoll
a60e356136 Enable Jest's multi-threaded support by default
Since the `JestClient` is auto-configured as a bean, it must have its
multi-threaded support enabled by default. This commit exposes a new
`spring.elasticsearch.jest.multi-threaded` property that is `true` by
default.

Closes gh-6806
2016-12-27 10:46:26 +01:00
Phillip Webb
d05357e036 Migrate to Tomcat WebSocket client
Move samples and tests from Jetty websocket client to Tomcat since the
upcoming Jetty release contains a bug in `JsrSession`
(https://github.com/eclipse/jetty.project/issues/1202).

See gh-7599
2016-12-24 11:24:30 -08:00
Spring Buildmaster
9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Stephane Nicoll
449043bf21 Polish contribution
Closes gh-6900
2016-12-22 15:39:31 +01:00
Vedran Pavic
65c2d1f5e7 Add support for vendor specific Flyway migration locations
This commit adds support for using `{vendor}` placeholder in
`flyway.locations` configuration property value.

See gh-6900
2016-12-22 14:56:28 +01:00
Stephane Nicoll
62bff1017e Validate that AopAutoConfiguration back off properly
Closes gh-7694
2016-12-22 14:48:54 +01:00
Stephane Nicoll
eb294956d8 Allow to customize Cluster.Builder rather than Cluster
Rework cb3d14a so that the customizer operates on the Builder rather than
the Cluster. The former exposes many more options.

See gh-7320
Closes gh-7669
2016-12-22 10:32:54 +01:00
Phillip Webb
982f41b70c Polish @IntegrationComponentScan auto-configuration
See gh-2037
See gh-7718
2016-12-21 22:22:50 -08:00
Artem Bilan
a79f71cbe8 Add @IntegrationComponentScan auto-configuration
Update Spring Integration auto-configuration so that
`@IntegrationComponentScan` from `AutoConfigurationPackages` is
implicitly applied. Prior to this commit `@MessagingGateway` interfaces
would only get picked up if `@IntegrationComponentScan` was added
alongside with the `@SpringBootApplication`.

Fixes gh-2037
Closes gh-7718
2016-12-21 20:18:07 -08:00
Phillip Webb
b87e02dde0 Polish Spring Integration metrics support
See gh-7722
2016-12-21 20:18:06 -08:00
Artem Bilan
d69e43b433 Refactor Spring Integration metrics support
Update Spring Integration metrics support since Spring Integration
`4.3.6`+ no longer needs `spring-integration-jmx` enable
`MessageChannel`, `MessageHandler` and `MessageSource` metrics.

- Add `IntegrationManagementConfiguration` conditional auto-configuration
  to provide `@EnableIntegrationManagement` when JMX is `enabled` or there
  is no `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean.
  By default this bean doesn't exist and you explicitly should declare it
  (e.g. via `@EnableIntegrationManagement`) if you would like to collect
  metrics. At the same time Spring Integration enables it when JMX
  management is present (that is a purpose of that new
  `IntegrationManagementConfiguration`)

- Change `SpringIntegrationMetricReader` to read metrics from the
  `IntegrationManagementConfigurer`, not `IntegrationMBeanExporter`

- Change `PublicMetricsAutoConfiguration` to register
  `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean if
  not present. Since we are here in `actuator`, therefore we are
  interested in the metrics for SI as well.

- Since we don't need JMX for the metrics any more, remove SI-JMX
  dependency from the `spring-boot-starter-integration`.

- Remove `IntegrationManagementConfiguration` modification from the
  `integrationMbeanExporter()`, since that looks like mutation of an
  external object, when end-user would prefer their own options.
  Therefore we don't need `ObjectProvider<IntegrationManagementConfigurer>`, too

- Add missed `MessageSourceMetrics` gathering for the
  `SpringIntegrationMetricReader`

Closes gh-7722
2016-12-21 20:18:06 -08:00
Artem Bilan
28474aa30a Fix compatibility with Apache Kafka 0.10.1
Update KafkaProperties since  Apache Kafka `0.10.1` changed the type
for the `ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG` from the
`Long` to `Integer`.

Kafka includes the following conversion logic:

    case LONG:
        if (value instanceof Integer)
            return ((Integer) value).longValue();
        if (value instanceof Long)
            return (Long) value;
        else if (value instanceof String)
            return Long.parseLong(trimmed);

So we remain compatible with both `0.10.0` and `0.10.1`

Closes gh-7723
2016-12-21 20:18:04 -08:00
Johnny Lim
e12b4a944f Polish 2016-12-21 20:18:04 -08:00
Phillip Webb
8f7efbe12a Polish spring.redis.url support
See gh-7395
2016-12-20 21:16:42 -08:00
Marco Aust
90eb58252e Add support for spring.redis.url property
Update `RedisAutoConfiguration` to optionally configure Redis using a
`spring.redis.url` property`.

Closes gh-7395
2016-12-20 21:16:42 -08:00
Phillip Webb
38f7389eab Polish loggers 2016-12-20 21:16:40 -08:00
Phillip Webb
1f7b3cad45 Polish Kafka properties
Closes gh-7672
2016-12-20 18:15:11 -08:00
Gary Russell
bdda470305 Support arbitrary Kafka properties
Add support for arbitrary Kafka properties via
`spring.kafka.properties.*` and also a `spring.kafka.max.poll.records`
property.

See gh-7672
2016-12-20 18:14:55 -08:00
Phillip Webb
99e72664d9 Polish spring transaction manager properties
Polish and update contribution so that TransactionManager properties can
be defined per technology, rather than globally.

Closes gh-7561
2016-12-20 17:59:19 -08:00
Kazuki Shimizu
80eee6b30f Support spring transaction manager properties
Add Spring TransactionManager properties to allow timeout and rollback
settings to be configured.

See gh-7561
2016-12-20 17:57:17 -08:00
Phillip Webb
3f4c32fcdd Polish 2016-12-20 14:54:04 -08:00
Dave Syer
6ccd858fc0 Fix checkstyle violations 2016-12-20 12:59:51 +00:00
Dave Syer
77a1a3b3c0 Allow user to signal that OAuth2 client is using client_credentials
By configuring security.oauth2.client.grantType=client_credentials the
user signals that (even in a web application) he doesn't want to use
the auth code grant (and hence session and request scoped beans for
client context).
2016-12-20 12:55:45 +00:00
Stephane Nicoll
851ce2286f Allow to override Couchbase's CustomConversions
Closes gh-7700
2016-12-20 11:59:16 +01:00
Phillip Webb
6121208cbb Polish formatting 2016-12-19 12:47:03 -08:00
Phillip Webb
4b9cba351b Merge branch '1.4.x' into 1.5.x 2016-12-19 12:36:57 -08:00
Phillip Webb
bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Stephane Nicoll
9104ea81e8 Expose Validator bean
This commit improves ValidationAutoConfiguration so that a `Validator`
bean is exposed if JSR 303 is available. This has the side effect of
automatically enable Spring Data Couchbase's entity validation rather
than requiring to expose a `Validator` bean.

Closes gh-5178
2016-12-19 14:06:17 +01:00
Andy Wilkinson
cedac27c80 Require Bean Validation 1.1 to enable validation auto-configuration
Previously, ValidationAutoConfiguration would configure a
MethodValidationPostProcessor if any Bean Validation 1.0 or later
implementation was available, however the underlying infrastructure
requires Bean Validation 1.1 with any implementation or
Bean Validation 1.0 with Hibernate Validator 4.3.

This caused a problem on TomEE which uses Apache BVal, and Bean
Validation 1.0 implementation. Spring Framework would identify that
Bean Validaton 1.0 was being used and then try to load Hibernate
Validator classes that are not present.

This commit fixes the problem by requiring Bean Validation 1.1 before
auto-configuring a MethodValidationPostProcessor.

Closes gh-7665
2016-12-16 12:17:34 +00:00
Stephane Nicoll
d8d5950e99 Enable validation in AutoConfigureWebMvc
Closes gh-7582
2016-12-15 16:55:34 +01:00
Andy Wilkinson
149f19cd58 Register any EventListener beans with auto-configured SessionFactory
Closes gh-7531
2016-12-13 12:41:29 +00:00
Stephane Nicoll
b80ad2a212 Harmonize Caffeine CacheManager bean name
Closes gh-6980
2016-12-12 11:40:39 +01:00
Madhura Bhave
95be208f0f Use IgnoredRequestCustomizer to ignore paths
Update `SpringBootWebSecurityConfiguration` to ignore requests by
delegating to `IgnoredRequestCustomizer` beans. This allows a single
Spring Boot `WebSecurityConfigurer<WebSecurity>` bean to be used which
prevents potential exceptions caused by duplicate `@Order` values.

Fixes gh-7106
2016-12-05 17:57:18 -08:00
Phillip Webb
f6b0652369 Merge branch '1.4.x' into 1.5.x 2016-12-05 11:17:13 -08:00
Madhura Bhave
64da63aa96 Use empty message for Non-Spring Boot Condition
Update `AbstractNestedCondition` to use an empty message for non
Spring Boot nested conditions.

Fixes gh-7519
Closes gh-7529
2016-12-05 11:16:25 -08:00
Phillip Webb
e430583eaf Polish 2016-12-05 11:08:38 -08:00
Andy Wilkinson
967625db1e Replace field injection with constructor injection in config classes
Closes gh-7563
2016-12-05 10:48:01 +00:00
Andy Wilkinson
5ac75c949c Increate timeout in Kafka tests as Windows CI agents are very slow 2016-12-05 09:20:43 +00:00
Andy Wilkinson
1464425d64 Remove use of @Component from classes that are not scanned
Closes gh-7549
2016-12-02 17:57:21 +00:00
Andy Wilkinson
b60150b05e Make Tomcat Access Log's buffering configurable via the environment
Closes gh-7456
2016-12-02 13:58:26 +00:00
Stephane Nicoll
ee72e788ed Rename spring-boot-junit-runners to spring-boot-test-support
Closes gh-7421
2016-12-01 16:25:47 +01:00
Andy Wilkinson
fdccd8aaa7 Remove use of field injection from ErrorMvcAutoConfiguration 2016-12-01 11:51:29 +00:00
Stephane Nicoll
cb9e021fa9 Polish 2016-12-01 12:09:41 +01:00
Stephane Nicoll
2c630b5c61 Validate schema and data resources
Previously, if a user specifies a path to a schema or data DDL that does
not exist, the application will start up fine and the missing DDL would
not be reported.

This commit validates that user-defined resources actually exist and
throw a new `ResourceNotFoundException` if they don't.

Closes gh-7088
2016-12-01 11:52:52 +01:00
Mark Paluch
6698cb71c4 Add User-defined type support for Cassandra
Configure `SimpleUserTypeResolver` if a keyspace is set to resolve
User-defined types.

Closes gh-7523
2016-11-30 15:37:55 +01:00
Stephane Nicoll
2f48c50e84 Merge branch '1.4.x' into 1.5.x 2016-11-30 13:50:09 +01:00
Stephane Nicoll
e5ca4990d0 Fix bootstrap-hosts property detection with list
Previously, if `spring.couchbase.bootstrap-hosts` was specified in YAML
or with the `[Idx]` notation, the auto-configuration would not kick in.

This is due to a limitation of `@ConditionalOnProperty` on a property of
type Collection. This commit workarounds this limitation for now with a
dedicated condition.

Closes gh-7508
2016-11-30 13:49:44 +01:00
Johnny Lim
c654eff41b Update doc for spring.data.neo4j.open-in-view
See gh-7533
2016-11-30 10:42:18 +01:00
Johnny Lim
423f8037ce Polish
Closes gh-7530
2016-11-30 08:31:13 +01:00
Oscar Utbult
fabe35fdc4 Remove redundant toString() invocation
Closes gh-7527
2016-11-30 08:23:03 +01:00
Phillip Webb
dada7423b0 Polish 2016-11-28 15:40:08 -08:00
Phillip Webb
ec73144240 Fix warnings 2016-11-28 15:31:49 -08:00
Phillip Webb
5ed00b3501 Merge branch '1.4.x' into 1.5.x 2016-11-28 15:27:07 -08:00
Phillip Webb
9fdb563d5a Polish 2016-11-28 15:27:01 -08:00
Phillip Webb
357d072a60 Polish 2016-11-28 15:14:46 -08:00
Andy Wilkinson
2be554456e Introduce SearchStrategy.ANCESTORS as a replacement for .PARENTS
Closes gh-6763
2016-11-28 15:41:53 +00:00
Stephane Nicoll
5d876125de Refine validation auto-configuration
Checking for the presence of a `ValidationProvider` resource is
unfortunately not enough to trigger the validation auto-configuration.

If `hibernate-validator` is added on the classpath without a `javax.el`
implementation, the former will blow up on startup. So far this was a
pilot error so we didn't have to care about it. Now that we have an
auto-configuration that may lead to this error, we need to be extra
careful and check that scenario ourselves.

This commit adds an extra condition that runs as late as possible and
attempt to actually initialize a `Validator`. If that fails for whatever
reason, the auto-configuration will now back off.

Several additional tests have been added to exercise this scenario.

Closes gh-6228
2016-11-28 14:29:05 +01:00
Johnny Lim
cabb564804 Add ValidationAutoConfiguration to spring.factories
Closes gh-7494
2016-11-28 09:04:36 +01:00
Stephane Nicoll
0befc310cd Add dedicated settings for maxHttpPostSize
This commit deprecates `server.max-http-post-size` and introduces a
dedicated property for each supported  container. In particular, Undertow
can now define a max size higher than 2GB.

Closes gh-7362
2016-11-25 09:54:10 +01:00
Stephane Nicoll
22208f6a9e Auto-configure validation constraints on bean methods
This commit auto-configures `MethodValidationPostProcessor` if necessary
when a JSR-303 validator implementation is detected on the classpath.

Closes gh-6228
2016-11-24 17:40:33 +01:00
Stephane Nicoll
7e25c0dcdd Fix build 2016-11-24 16:46:34 +01:00
Stephane Nicoll
57605b6749 Merge branch '1.4.x' into 1.5.x 2016-11-24 15:53:38 +01:00
Stephane Nicoll
65b6d8f4f7 Handle NoClassDefFoundError in OnBeanCondition
If `OnBeanCondition` is used with a `String` literal representing the
fully qualified name of a bean and such type does not exist, it
gracefully manages it as if it was not found. Prior to this commit, an
exception would be thrown if any related class such as the parent
class does not exist.

This commit handles this additional case, catching `NoClassDefFoundError`
the same way it did handle `ClassNotFoundException`. That way, a
missing type will now be considered as absent if it's not on the
classpath.

Closes gh-7459
2016-11-24 15:48:56 +01:00
Stephane Nicoll
64a50b60ab Merge branch '1.4.x' into 1.5.x 2016-11-24 10:01:23 +01:00
Stephane Nicoll
5e8ba5cef6 Fix Couchbase condition on Spring Data class
This commit reverts 7e2d0fd so that the Couchbase auto-configuration can
work without Spring Data again. It also removes the `Class` reference to
a Spring Data class to a `String` reference to make sure the condition
operates properly when said class isn't on the classpath.

Closes gh-7453
2016-11-24 09:41:19 +01:00
Stephane Nicoll
64e0899456 Polish customize Cassandra's Cluster
Closes gh-7320
2016-11-23 15:16:49 +01:00
Eddú Meléndez
cb3d14a305 Allow to customize Casssandra's Cluster
This commit allows to configure special customizers to be used by
Cluster.

Closes gh-7312
2016-11-23 15:16:49 +01:00
Stephane Nicoll
ea023618a4 Polish upgrade to Spring Session 1.3.0.RC1
Closes gh-7457
2016-11-23 14:39:56 +01:00
Vedran Pavic
ffec6fddd2 Upgrade Spring Session to 1.3.0.RC1
See gh-7457
2016-11-23 14:39:56 +01:00
Phillip Webb
88c84ce234 Merge branch '1.4.x' into 1.5.x 2016-11-22 14:53:30 -08:00
Phillip Webb
b6b8bef009 Polish 2016-11-22 14:51:56 -08:00
Phillip Webb
7e2d0fd1c0 Check for Spring Data before configuring Couchbase
Add guard to `CouchbaseAutoConfiguration` so ensure that Spring Data
Couchbase is on the classpath.

Fixes gh-7453
2016-11-22 14:32:38 -08:00
Grigory Fadeev
1ea829e003 Fix connector used to configure connection timeout
Fix Tomcat customization so that the main connection is configured with
any timeout.

Closes gh-7425
2016-11-22 14:28:57 -08:00
Andy Wilkinson
65d0c07fd6 Polish "Validate excluded autoconfiguration classes"
- Apply code formatting
- Move configuration of excepted exception to immediately before line
  that will throw the exception
- Use String.format with %n to produce platform-specific new lines

See gh-7407
2016-11-22 14:10:37 +00:00
Madhura Bhave
a9ffdca6f2 Validate excluded autoconfiguration classes
Closes gh-7407
See gh-6865
2016-11-22 14:02:51 +00:00
Andy Wilkinson
ff4bbd9291 Fix javadoc and apply code formatting to Kafka contribution
See gh-6961
2016-11-22 11:34:29 +00:00
Andy Wilkinson
29f0ae3fa8 Use a random port in new tests in SpringBootWebSecurityConfigurationTests
See gh-7373
2016-11-22 11:03:05 +00:00
Stephane Nicoll
cc07f56c87 Merge pull request #6961 from garyrussell:kafkaAutoConfig
* pr/6961:
  Polish "Apache Kafka support" contribution
  Add Apache Kafka support
2016-11-22 10:29:01 +01:00
Stephane Nicoll
642af52d01 Polish "Apache Kafka support" contribution
Closes gh-6961
2016-11-22 10:22:00 +01:00
Gary Russell
c4188c8e4a Add Apache Kafka support
See gh-6961
2016-11-22 09:34:01 +01:00
Andy Wilkinson
5a9fc9aa49 Merge branch '1.4.x' into 1.5.x 2016-11-21 13:35:22 +00:00
Andy Wilkinson
3464c0b16e Ensure that Hypermedia-related auto-config works without Jackson
Previously, both HypermediaAutoConfiguration and HttpMessageConverters
assumed that if Spring HATEOAS was on the class path, then Jackson
would be too. When this was not the case, an application would fail
to start.

This commit updates both classes to back off appropriately when
Spring HATEOAS is on the classpath but Jackson is not.

Closes gh-7434
2016-11-21 13:25:25 +00:00
Stephane Nicoll
9423b9831c Merge branch '1.4.x' into 1.5.x 2016-11-20 15:52:49 +09:00
Stephane Nicoll
249ed899a6 Fix use of KB and MB in Multipart documentation
Closes gh-7364
2016-11-20 15:51:47 +09:00
Phillip Webb
1657120286 Move ModifiedClassPathRunner to its own module
Migrate `ModifiedClassPathRunner` from `spring-boot` test source to
its own module.

Fixes gh-7420
2016-11-18 17:27:54 -08:00
Phillip Webb
9e18021e8c Merge branch '1.4.x' into 1.5.x 2016-11-18 15:59:05 -08:00
Phillip Webb
fce17ca6d9 Polish 2016-11-18 15:50:19 -08:00
Andy Wilkinson
1cd781b242 Make spring-boot-test compatible with Mockito 2.1 and 2.2
We use some internal Mockito classes and some  breaking API changes
have been made to them in Mockito 2. This commit introduces a utility
class, SpringBootMockUtil, to shield our code from these differences.
Mockito 1 is called directly and Mockito 2 is called via reflection.

To allow these changes to be tested, FilteredClassPathRunner has been
enhanced to also support overriding a dependency on the class path.
As a result it has been renamed to ModifiedClassPathRunner. The new
ClassPathOverrides annotation can be used to provide the Maven
coordinates of one or more dependencies that should be resolved and
added to the class path. Such additions are added to the start of
the class path so that they override any existing dependency that
contains the same classes.

Closes gh-6520
2016-11-18 16:39:44 +00:00
Andy Wilkinson
af4ca7cf6e Align Spring Data Neo4j auto-configuration with latest Ingalls snapshots
Closes gh-7391
2016-11-18 11:22:39 +00:00
Stephane Nicoll
2ba3b27954 Merge branch '1.4.x' into 1.5.x
# Conflicts:
#	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
#	spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
2016-11-18 11:56:22 +09:00
Stephane Nicoll
0072a93915 Expose Tomcat's accesslog requestAttributesEnabled
This commit adds an extra property to the `server.tomcat.accesslog` to
control the `reqestAttributesEnabled` flag. This flag sets request
attributes for IP address, Hostname, protocol and port used for the
request.

Closes gh-7367
2016-11-18 11:48:09 +09:00
Phillip Webb
238c22cd73 Polish content security policy contribution
See gh-7373
See gh-7373
2016-11-16 15:30:36 -08:00
Christoffer Sawicki
d7bbea63b7 Add properties for content security policy
Add `content-security-policy` and `content-security-policy-mode`
`security.header` properties and update auto-configuration to apply
them when specified.

Fixes gh-7373
Closes gh-7357
2016-11-16 15:30:36 -08:00
Johnny Lim
8038882d46 Polish
Closes gh-7403
2016-11-16 13:36:51 -08:00
Andy Wilkinson
387a406aad Merge branch '1.4.x' into 1.5.x 2016-11-16 09:13:17 +00:00
Andy Wilkinson
b3e0a37197 Remove unwanted System.out calls in test code 2016-11-16 09:12:13 +00:00
Spring Buildmaster
e712a9ba8c Next Development Version 2016-11-08 16:55:37 +00:00
Stephane Nicoll
b51f92d9a4 Merge branch '1.4.x' into 1.5.x 2016-11-06 11:25:44 +01:00
Vedran Pavic
5783cd5593 Fix JWT token URI derivation
Closes gh-7299
2016-11-06 11:24:50 +01:00
Phillip Webb
81c5753f4d Merge branch '1.4.x' into 1.5.x 2016-11-03 14:49:38 -07:00
Phillip Webb
90afc8ebbe Formatting 2016-11-03 14:48:10 -07:00
Madhura Bhave
73308ba24b Merge remote-tracking branch 'springsource/1.4.x' into 1.5.x 2016-11-03 10:15:49 -07:00
Madhura Bhave
b04a74f01d Fix failure analysis for Collections and Maps
Closes gh-6996
2016-11-03 10:14:01 -07:00
Phillip Webb
5b66ffbb4b Merge branch '1.4.x' into 1.5.x 2016-10-31 23:09:36 -07:00
Phillip Webb
f4328b41af Polish 2016-10-31 23:09:25 -07:00
Phillip Webb
1b17677e0b Polish TLD skip pattern support
See gh-5010
2016-10-31 23:09:24 -07:00
Phillip Webb
dbf6d3d418 Don't detect persistenceUnitRootLocation
Update JpaBaseConfiguration so that the persistenceUnitRootLocation is
no longer detected. The update to gh-7003 means that we can now rely on
the standard detection mechanism.

Fixes gh-6983
See gh-6635
2016-10-31 15:57:18 -07:00
Stephane Nicoll
9100897dcb Automatically exclude auto-configurations from component scan
Previously, if an auto-configuration class was (wrongly) located in a
candidate package for component scanning, the class was silently loaded
as an app configuration (i.e. with the wrong lifecycle).

This commit adds an `AutoConfigurationExcludeFilter` to
`@SpringBootApplication` so that such classes are automatically
filtered. Since they are registered in `spring.factories`, we can
silently ignore them since we know they'll be loaded later on.

Closes gh-7168
2016-10-31 15:13:58 +01:00
Stephane Nicoll
4f06e52d7e Allow adding additional tld skip patterns
This commit improves `TomcatEmbeddedServletContainerFactory` so that tld
skip patterns can be set or added to an existing set. An additional
`server.tomcat.additional-tld-skip-patterns` is now being exposed to
easily add patterns via configuration.

Closes gh-5010
2016-10-31 10:15:16 +01:00
Stephane Nicoll
94da9ad6e6 Merge branch '1.4.x' into 1.5.x 2016-10-30 11:24:46 +01:00
Stephane Nicoll
1a6ab90255 Polish test 2016-10-30 11:24:33 +01:00
Stephane Nicoll
ed7de8eb60 Polish contribution
Also add rotate attribute to Undertow

Closes gh-7225
2016-10-26 11:31:17 +02:00
Matthieu Mouminoux
1d95219c4b Allow to configure Tomcat's rotatable property
See gh-7225
2016-10-26 10:28:06 +02:00
Stephane Nicoll
ae4dd0d17e Merge branch '1.4.x' into 1.5.x 2016-10-24 18:08:23 +02:00
Stephane Nicoll
a638dcd51b Remove unnecessary use of System.out.println 2016-10-24 18:07:40 +02:00
Andy Wilkinson
a416f496c0 Clean up deprecation and unused code warnings 2016-10-18 20:43:05 +01:00
Andy Wilkinson
29d4a01b30 Merge branch '1.4.x' into 1.5.x 2016-10-13 12:30:05 +01:00
Andy Wilkinson
7968c6b548 Assign on order to OnPropertyCondition
Closes gh-7144
2016-10-13 12:29:35 +01:00
Andy Wilkinson
cc04621dc2 Assign an order to OnResourceCondition
Closes gh-7145
2016-10-13 12:27:47 +01:00
Madhura Bhave
90722a9bca Add @ConditionalOnCloudPlatform
Add a @ConditionalOnCloudPlatform annotation that matches based on the
active ClouldPlatform.

Fixes gh-7155
2016-10-12 13:32:37 -07:00
Phillip Webb
d818a09ed8 Polish 2016-10-11 23:38:14 -07:00
Phillip Webb
d3e06c4627 Merge branch '1.4.x' into 1.5.x 2016-10-11 21:46:06 -07:00
Phillip Webb
db3f488d5a Polish 2016-10-11 17:54:00 -07:00
Stephane Nicoll
6fb53f90e5 Polish contribution
Closes gh-6666
2016-10-11 17:03:10 +02:00
Maciej Walkowiak
47ec8630c8 Add Rabbit idleEventInterval property
This commit adds a property to configure how often idle container events
should be published.

See gh-6666
2016-10-11 15:49:10 +02:00
Andy Wilkinson
f0b235cbc5 Merge branch '1.4.x' into 1.5.x 2016-10-11 13:04:59 +01:00
Andy Wilkinson
0333416952 Update WelcomePageHandlerMapping to handle reqs with no Accept header
Closes gh-7138
2016-10-11 13:02:36 +01:00
Stephane Nicoll
ab2a2579c8 Polish contribution
Closes gh-6571
2016-10-10 11:37:21 +02:00
Aurélien Leboulanger
7efdb91641 Manage Tomcat queued connections
Adding two tomcat server properties:
- server.tomcat.accept-count
- server.tomcat.max-connections

Closes gh-6433
2016-10-10 11:37:12 +02:00
Stephane Nicoll
3e1425ebed Polish contribution
Closes gh-6543
2016-10-10 10:43:12 +02:00
Vedran Pavic
286a928347 Improve database initializers
This commit improves database initializers for Spring Batch and Spring
Session by introducing `AbstractDatabaseInitializer` which eliminates
duplicated logic in existing initializers. Additionally, database
platform resolution now relies on `DatabaseDriver`.

See gh-6543
2016-10-10 09:53:40 +02:00
Stephane Nicoll
ed333a67b4 Expose Spring Data Rest RepositoryDetectionStrategy
Closes gh-7113
2016-10-07 10:35:48 +02:00
Stephane Nicoll
02b0e3955c Merge branch '1.4.x' into 1.5.x 2016-10-07 09:46:21 +02:00
Johnny Lim
1c4c0c6119 Fix String.format() usages
Closes gh-7120
2016-10-07 09:45:43 +02:00
Andy Wilkinson
9b8f33df6d Merge branch '1.4.x' into 1.5.x 2016-10-06 15:53:07 +01:00
Andy Wilkinson
20a2db79bd Separate conditions that did and did not match in auto-config report
Closes gh-7098
2016-10-06 15:52:45 +01:00
Stephane Nicoll
f82e91df39 Merge branch '1.4.x' into 1.5.x 2016-10-06 13:29:53 +02:00
Stephane Nicoll
03961e6692 Polish contribution
Closes gh-7004
2016-10-06 13:28:23 +02:00
Rob Fletcher
7fcb197092 Allow configuration to specify randomly generated database name
See gh-7004
2016-10-06 11:40:19 +02:00
Stephane Nicoll
200e246238 Merge branch '1.4.x' into 1.5.x 2016-10-06 09:35:01 +02:00
Johnny Lim
91254f2110 Remove unused parameters in String.format()
Closes gh-7111
2016-10-06 09:34:32 +02:00
Stephane Nicoll
cf28663cd7 Deprecate commons-dbcp 1
Closes gh-6787
2016-10-05 15:21:09 +02:00
Stephane Nicoll
07690bab25 Allow customization of the auto-configured JmsTemplate
Closes gh-6825
2016-10-04 15:00:42 +02:00
Phillip Webb
a2315378d4 Formatting 2016-10-03 22:44:36 -07:00
Phillip Webb
f2b0fa284e Merge branch '1.4.x' into 1.5.x 2016-10-03 22:38:22 -07:00
Phillip Webb
3326841a97 Formatting 2016-10-03 22:19:35 -07:00
Phillip Webb
39ed0d4dfb Polish 2016-10-03 21:58:13 -07:00
Stephane Nicoll
8ad477537e Fail fast if both uri and client attributes are set
Previously, an URI and individual client attributes can be set to
configure the mongo client. In such a scenario, the URI is ignored.

This commit changes the URI to be "null" and the creation of the client
to fail if both the uri and client attributes are set. If no client
attributes are set, the uri is used as before.

Closes gh-6739
2016-10-03 11:29:20 +02:00
Stephane Nicoll
e643fc5bd1 Merge branch '1.4.x' into 1.5.x 2016-10-02 11:08:33 +02:00
Johnny Lim
503d735fdd Polish
Closes gh-7081
2016-10-02 11:07:04 +02:00
Stephane Nicoll
7ffa499949 Merge branch '1.4.x' into 1.5.x 2016-09-30 10:52:44 +02:00
Stephane Nicoll
e56119165e Close JestClient on shutdown
Closes gh-7051
2016-09-30 10:51:48 +02:00
Stephane Nicoll
8ed20068ca Fix list property to be mutable
Closes gh-7045
2016-09-30 10:34:25 +02:00
Andy Wilkinson
2a035d0748 Remove support for Velocity following its deprecation in 1.4
Closes gh-6971
2016-09-29 15:44:36 +01:00
Andy Wilkinson
464915d2cc Remove support for HornetQ following its deprecation in 1.4
See gh-6971
2016-09-29 15:44:36 +01:00
Andy Wilkinson
0232e3b16c Merge branch '1.4.x' into 1.5.x 2016-09-29 15:09:08 +01:00
Andy Wilkinson
d08c84af42 Ensure that JtaAutoConfiguration runs before ArtemisAutoConfiguration
Closes gh-7062
2016-09-29 15:08:24 +01:00
Andy Wilkinson
b4d052a7b3 Merge branch '1.4.x' into 1.5.x 2016-09-29 15:01:54 +01:00
Andy Wilkinson
33ea73996e Make auto-config for Narayana back off when Transaction SPI not on classpath
Closes gh-7061
2016-09-29 14:56:05 +01:00
Vedran Pavic
c4aa78679a Upgrade Hazelcast to 3.7.1
In addition, dependency management for `hazelcast-hibernate5` module has
been added, and a separate dependency version was introduced for
`hazelcast-hibernate4` module.

Closes gh-7023
2016-09-29 10:37:29 +02:00
Stephane Nicoll
cdd59707fc Merge branch '1.4.x' into 1.5.x 2016-09-28 17:00:30 +02:00
Johnny Lim
30a677646f Polish
Closes gh-7030
2016-09-28 16:45:19 +02:00
Vedran Pavic
f485660482 Upgrade Spring Session to 1.3.0.M2
Closes gh-6979
2016-09-28 11:07:11 +01:00
Stephane Nicoll
7dfa3a8c83 Harmonize Caffeine CacheManager bean name
Closes gh-6980
2016-09-26 10:47:09 +02:00
Andy Wilkinson
aaf435ff2a Suppress Neo4J-related deprecation warnings
See gh-6976
2016-09-21 20:57:05 +01:00
Andy Wilkinson
c108da9d53 Upgrade to Spring Data Ingalls M1
Closes gh-6785
Closes gh-5835
2016-09-21 17:01:47 +01:00
Stephane Nicoll
bd7c20eb1c Deprecate Guava support 2016-09-21 14:59:02 +02:00
Stephane Nicoll
ce1e41dce3 Remove deprecated code
This code removes code deprecated in 1.4 with the exception of code that
requires an update to Spring Framework 5.

Closes gh-6971
2016-09-21 14:30:28 +02:00
Stephane Nicoll
6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Spring Buildmaster
7e9ed5e1a7 Next Development Version 2016-09-21 07:58:07 +00:00
Phillip Webb
51092af739 Polish 2016-09-20 14:32:09 -07:00
Spring Buildmaster
5f959b074f Next Development Version 2016-09-20 20:20:06 +00:00
Andy Wilkinson
b6e3eb0db3 Upgrade to Tomcat 8.0.37
Closes gh-6930
2016-09-19 20:26:19 +01:00
Eddú Meléndez
bc55b6e0d4 Add contextPath LocalHostUriTemplateHandler URIs
Update `LocalHostUriTemplateHandler` so that the `server.context-path`
property is also considered when building the URL.

Fixes gh-6904
Closes gh-6919
2016-09-17 19:33:06 -07:00
Phillip Webb
0eab3e0c5a Drop printed link to reference documentation
Tweak the fix from 50c68a49 to no longer print a link the reference
documentation.

See gh-6593
2016-09-16 17:52:25 -07:00
Phillip Webb
825dd0a26c Merge branch '1.3.x' 2016-09-16 15:07:18 -07:00
Phillip Webb
b97e0bd471 Allow HttpPutFormContentFilter to be disabled
Add `spring.mvc.formcontent.putfilter.enabled` property to allow the
HttpPutFormContentFilter to be disabled.

Fixes gh-6519
2016-09-16 14:14:21 -07:00
Phillip Webb
a2e4127d4f Fix multi-annotation nested condition logic
Update `AbstractNestedCondition` to correctly group nested conditions
on members.

Fixes gh-6672
2016-09-16 13:31:55 -07:00
Stephane Nicoll
50c68a497b Improve startup error message
This commit improves the startup error message so that it does not
reference  `--debug` anymore. Such command-line switch only works when
the application is started using `java -jar`.

The error message now refers directly to a section of the documentation
that provides more details and links to more useful examples.

Closes gh-6593
2016-09-16 16:37:50 +02:00
Stephane Nicoll
78bb04f2c1 Polish 2016-09-16 14:54:11 +02:00
Stephane Nicoll
284988f0cd Clarify SpringBootWebSecurityConfiguration scope
This commit fixes the documentation that wrongly states that
SpringBootWebSecurityConfiguration is an auto-configuration. Rather than
excluding this class, we should exclude SecurityAutoConfiguration that
imports it.

Closes gh-6861
2016-09-16 14:53:50 +02:00
Oliver Gierke
0860ad4fd4 Use default simple types with MongoMappingContext
Change the auto-configure MongoMappingContext to use the
SimpleTypesHolder instance `Set` that's produced by a CustomConversions
bean, which we in turn now default, too.

This update is necessary as `CustomConversions` registers converters by
inspecting the classpath (to automatically detect Java 8, JodaTime etc.)
and by that rendering the types for which we find converters for as
simple ones, i.e. non-entities.

Fixes gh-6881
Closes gh-6882
2016-09-15 10:42:59 -07:00