Commit Graph

2571 Commits

Author SHA1 Message Date
Stephane Nicoll
7b3bedc468 Fix detection of dot-based resource bundle basenames
This commit makes sure that properties-based resource bundle location
with a dot is detected. It also harmonizes the description of the
configuration key as our support is not stricly matching the convention.

Closes gh-10092
2018-01-09 13:18:48 +01:00
Johnny Lim
d2109ddf4d Use MongoClient consistently
Closes gh-11431
2017-12-27 17:01:59 +01:00
Stephane Nicoll
29565a7981 Polish 2017-12-14 10:59:23 +01:00
Stephane Nicoll
dbae4fc1c3 Make it easier to use jOOQ with several data sources
Closes gh-11324
2017-12-14 09:33:10 +01:00
Phillip Webb
6a55623910 Polish 2017-12-13 12:21:57 -08:00
Stephane Nicoll
7b8adfab41 Polish 2017-11-30 18:00:43 +01:00
Stephane Nicoll
d920b49ba1 Polish
See gh-11193
2017-11-29 10:47:09 +01:00
Spring Buildmaster
df2ae7aa19 Next Development Version 2017-11-28 09:55:46 +00:00
Andy Wilkinson
137d3f3533 Test Flyway location checking with implicit classpath: prefix
Closes gh-10894
2017-11-23 11:44:25 +00:00
Andy Wilkinson
d4e19f8170 Auto-configure jOOQ after transaction auto-configuration
jOOQ auto-configuration will make use of a PlatformTransactionManager
bean if available. This commit ensures that jOOQ is auto-configured
after transaction auto-configuration, thereby ensuring that any
auto-configuration PlatformTransactionManager bean can be consumed.

Closes gh-11052
2017-11-23 11:33:16 +00:00
Stephane Nicoll
fc3d25d705 Properly document spring.data.neo4j.open-in-view's default value
Closes gh-10826
2017-10-30 16:22:10 +01:00
Marten Deinum
ab3d65ccae Polish JobLauncherCommandLineRunner
The JobLauncherCommandLineRunner reassigned method arguments inside the
merge method. Instead of reassigning the method argument just return
the new instance directly.

Also some minor cleanup (unnesseccary null check and continue keyword).

Closes gh-10612
2017-10-28 07:57:14 +02:00
Stephane Nicoll
81e33dc801 Fix NPE in url is null and no embedded database is available
Closes gh-10626
2017-10-25 13:57:00 +02:00
Spring Buildmaster
c0f9f64776 Next Development Version 2017-10-16 12:36:43 +00:00
Andy Wilkinson
ffdff1cdc2 Consider multiple MBeanExporters when excluding beans from export
Closes gh-10632
2017-10-13 12:31:57 +01:00
Johnny Lim
bfa291f671 Polish 2017-10-02 15:07:03 +01:00
Andy Wilkinson
616d11c00a Only wait for background preinit to complete when it has started
Closes gh-10362
2017-09-25 17:06:28 +01:00
Eddú Meléndez
93844bffbc Polish JacksonAutoConfiguration
This commit removes unused constructor parameters introduced in 0c2ecb7.

Closes gh-10412
2017-09-25 10:05:29 +02:00
Stephane Nicoll
d490b99473 Clarify scope of spring.datasource.platform
Closes gh-10416
2017-09-25 10:04:37 +02:00
Stephane Nicoll
61ae92992b Polish "Document default value change for proxy-target-class"
Closes gh-10134
2017-09-16 06:46:36 +02:00
Stephane Nicoll
fbb6b88155 Document default prefix/suffix values
Closes gh-10290
2017-09-15 12:47:46 +02:00
Stephane Nicoll
b309495c2e Polish 2017-09-15 12:36:11 +02:00
Spring Buildmaster
30eb937a83 Next Development Version 2017-09-12 10:54:22 +00:00
Andy Wilkinson
5938df52ea Stop auto-config of MethodValidationPP triggering early init
Previously, if a user's configuration class provided a custom
Validator bean, that configuration class would be initialized very
early so that the Validator could be used to create the
auto-configured MethodValidationPostProcessor. This early
initialization could problems as it may prevent any of the
configuration class's dependencies from being post-processed.

This commit updates the injection of the Validator bean to be lazy,
thereby preventing the creation of the auto-configured
MethodValidationPostProcessor from triggering early initialization.

Closes gh-9416
2017-09-11 11:52:38 +01:00
Stephane Nicoll
db18abc542 Fix Elasticsearch template condition if no client is defined
This commit makes sure to backoff if a Client bean is not available.

Closes gh-10143
2017-09-07 10:32:21 +02:00
Stephane Nicoll
5fc01880bc Polish 2017-09-07 09:55:50 +02:00
Madhura Bhave
64ffcfc83f Document JWK property
Closes gh-10022
2017-08-29 12:51:14 -07:00
Paul Vorbach
04ca7f137d Identify and fix incomplete assertions
Several calls to assertThat lacked a following assertion most often due
to wrong use of parenthesis.

See gh-10084
2017-08-29 13:49:28 +02:00
Madhura Bhave
9b5e5f32e1 ClientId not always required for client credentials
Fixes gh-10013
2017-08-27 23:23:00 -07:00
Stephane Nicoll
fa037610f8 Add missing class check on Neo4jDataAutoConfiguration
Neo4jDataAutoConfiguration is meant to kick in when Spring Data Neo4J is
on the classpath. Yet, we were only checking for the presence of neo4j
itself and the transaction manager provided by spring-tx.

This commit makes sure to back off if Spring Data Neo4J is not present.

Closes gh-10038
2017-08-18 12:07:59 +02:00
Stephane Nicoll
dbaaf2a5fa Improve conditions on FreeMarkerWebConfiguration
This commit makes sure to prevent the Freemarker web auto-configuration
to kick in if `spring-webmvc` is not on the classpath.

Closes gh-10027
2017-08-17 13:28:45 +02:00
Andy Wilkinson
e08d09f5a3 Polish "Fix logged property names when initializing OAuth2 client"
See gh-9944
2017-08-09 11:26:56 +01:00
Christian Bühler
6babd41f19 Fix logged property names when initializing OAuth2 client
Closes gh-9944
2017-08-09 11:23:51 +01:00
Johnny Lim
56f47e1a50 Polish
Closes gh-9938
2017-08-03 21:17:10 +01:00
Gytis Trikleris
f43ad00129 Delay Narayana recovery manager until it's started explicitly
Closes gh-9641
2017-08-01 15:42:40 +01:00
Andy Wilkinson
d62c26c971 Ensure that preinitialization has completed before run returns
Previously, background preinitialization was started in response to
an ApplicationEnvironmentPreparedEvent and would complete at an
undetermined time later. This opened a window where SpringApplication
run could return and background preinitialization could still be
in progress. If, within this window, something attempted to configure
the logging system, an IO failure could occur as logging on the
background preinitialization thread would attempt to use resources
that had been closed.

This commit updates BackgroundPreinitializer so that it waits for
preinitialization to have completed when it receives an application
ready or application failed event. This prevents SpringApplication
run from returning while preinitialization is still in progress,
closing the window described above.

With info level logging enabled it appears that background
preinitialization consistently completes before the application ready
event is published. As a result, waiting should have no adverse effect
on performance in normal circumstances. With logging configured such
that background preinitialization outputs a large volume of log
messages (enabling trace logging for the root logger, for example), it
will be slowed down sufficiently for waiting to be necessary.

Closes gh-5669
2017-07-27 10:18:21 +01:00
Andy Wilkinson
42eec50e90 Perform background preinitialization once per class loader
Background preinitialization triggers static initialization of a
number of components that are slow to initialize. As the
initialization is static, it's only necessary once per class loader.

Previously, a new background preinitialization thread would be
created and started for each ApplicationEnvironmentPreparedEvent.
This commit updates the preinitializer to only create and start the
thread if preinitialization has not already been started for the
current class loader.

Closes gh-9869
2017-07-27 10:18:21 +01:00
Spring Buildmaster
17a5bb0be4 Next development version 2017-07-27 08:00:21 +00:00
Spring Buildmaster
41c5c0e7c9 Next development version 2017-07-26 08:30:55 +00:00
Phillip Webb
dca463c7d9 Polish 2017-07-24 12:54:24 -07:00
Phillip Webb
66619bbe2b Formatting 2017-07-24 12:54:24 -07:00
Phillip Webb
b9cfe21193 Make @ImportAutoConfiguration not register package
Update `@ImportAutoConfiguration` so that it is no longer annotated with
`@AutoConfigurationPackage` and as such isn't a marker for
`AutoConfigurationPackages`.

Having `@ImportAutoConfiguration` marked as an auto-configuration
package is particularly problematic in tests since it frequently breaks
context caching.

Fixes gh-9282
2017-07-24 12:54:24 -07:00
Stephane Nicoll
9fd94720f1 Better customization of the auto-configured ActiveMQConnectionFactory
This commit exposes additional properties and a callback interface to
further tune the auto-configured ActiveMQConnectionFactory.

Closes gh-9667
2017-07-24 15:27:17 +02:00
Stephane Nicoll
9a34d952e9 Provide an alternative to spring.activemq.pool.configuration
This commit expands the support of PooledConnectionFactory so that
binding the third party object is no longer necessary. All 3rd party
properties are now deprecated in favour of our explicit support.

The main reason behind this change is that a `connection-factory` and
`properties` property were exposed. The former is used to set the
`ConnectionFactory` and makes no sense as a key. The latter is
rebuilding the underlying `ActiveMQConnectionFactory` at each call
without reusing any existing settings.

Closes gh-9837
2017-07-24 13:48:53 +02:00
Andy Wilkinson
d4ecda9030 Work around javac bug (internal review ID 9050163) 2017-07-24 12:37:14 +01:00
Andy Wilkinson
bb35e772c2 Polish "Make NarayanaRecoveryManagerBean conditional on missing bean"
Closes gh-9724
2017-07-24 11:17:39 +01:00
Gytis Trikleris
d8a6954744 Make NarayanaRecoveryManagerBean conditional on missing bean
See gh-9724
2017-07-24 11:16:34 +01:00
Andy Wilkinson
8f877dcee2 Disable auto-config of Narayana's JMS support when JMS module absent
Closes gh-9844
2017-07-24 10:42:40 +01:00
Andy Wilkinson
39b4ecdf63 Adapt to breaking change in Spring Data
See gh-9834
2017-07-22 08:11:26 +01:00
Andy Wilkinson
c70cc55db8 Polishing
See gh-9827
2017-07-21 15:35:57 +01:00
Andy Wilkinson
15410a406e Revert "Stop auto-config of MethodValidationPP triggering early init"
5198fe887b. The underlying Framework
problem that prevents @Lazy from working properly is still there
in some form or another.

See gh-9416
2017-07-21 14:35:58 +01:00
Andy Wilkinson
5198fe887b Stop auto-config of MethodValidationPP triggering early init
Previously, if a user's configuration class provided a custom
Validator bean, that configuration class would be initialized very
early so that the Validator could be used to create the
auto-configured MethodValidationPostProcessor. This early
initialization could problems as it may prevent any of the
configuration class's dependencies from being post-processed.

This commit updates the injection of the Validator bean to be lazy,
thereby preventing the creation of the auto-configured
MethodValidationPostProcessor from triggering early initialization.

Closes gh-9416
2017-07-21 13:33:33 +01:00
Phillip Webb
68910f2b8f Polish 2017-07-19 10:21:06 -07:00
Stephane Nicoll
7e97d38de7 Polish Javadoc
Closes gh-9726
2017-07-19 14:38:38 +02:00
Madhura Bhave
6381b88736 Create Jwk and Jwt token store beans conditionally
Closes gh-9777
2017-07-17 16:51:16 -07:00
Phillip Webb
aa57ca7e18 Polish 2017-07-06 16:53:04 -07:00
Stephane Nicoll
85c7643638 Remove use of 'javax.annotation.Resource'
This commit removes the only use of the `javax.annotation.Resource`
annotation from the codebase. This ensures that injection point are
only defined with Spring's annotation model.

Closes gh-9441
2017-06-26 17:46:46 +02:00
Stephane Nicoll
58a1ed19a9 Polish 2017-06-26 13:36:57 +02:00
Stephane Nicoll
5aa27beb54 Polish 2017-06-23 11:40:16 +02:00
Stephane Nicoll
90c4e7518b Detect Neo4j https driver url
Closes gh-9549
2017-06-23 11:39:39 +02:00
Johnny Lim
8ca70a7efd Polish
See gh-9570
2017-06-22 09:28:49 +02:00
Madhura Bhave
e437c4cd67 OAuth2ClientIdCondition should not match if clientId absent
Fixes gh-9435
2017-06-16 10:55:49 -07:00
Stephane Nicoll
5d69318e2d Add reference to SpringBootApplication in EnableAutoConfiguration
Closes gh-9521
2017-06-15 13:43:13 +02:00
Spring Buildmaster
05d4d0281c Next Development Version 2017-06-08 12:47:16 +00:00
Spring Buildmaster
88e43c8421 Next Development Version 2017-06-08 09:52:43 +00:00
Andy Wilkinson
e5906a6b64 Allow HttpMsgConverter to depend on ConvService without creating a cycle
In an MVC web application, DelegatingWebMvcConfiguration provides the
ConversionService while also consuming WebMvcConfigurerAdapters that,
among other things, can configure HTTP message converters. Boot's
WebMvcConfigurerAdapter, WebMvcAutoConfigurationAdapter, consumes
the HttpMessageConverters bean and uses it to configure Spring MVC's
HTTP message converters. This can create a bean dependency cycle if
an HTTP message converter bean depends, directly or indirectly on
the ConversionService. An example of the cycle is:

┌─────┐
|  jsonComponentConversionServiceCycle.ThingDeserializer defined in …
↑     ↓
|  org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration
↑     ↓
|  org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter
↑     ↓
|  org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration
↑     ↓
|  mappingJackson2HttpMessageConverter defined in class path resource [org/springframework/boot/autoconfigure/web/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]
↑     ↓
|  jacksonObjectMapper defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]
└─────┘

This commit breaks the cycle by making WebMvcAutoConfigurationAdapter
consume HttpMessageConverters lazily. This allows the adapter to be
created without triggered instantiation of every HTTP message
converter bean and all their dependencies. This allows it to be
injected into DelegatingWebMvcConfiguration without triggering an
attempt to retrieve the ConversionService.

Closes gh-9409
2017-06-07 17:18:09 +01:00
Andy Wilkinson
6b7dfce5c6 Formatting 2017-06-07 17:17:57 +01:00
Andy Wilkinson
a03ddd331c Polishing 2017-06-07 17:14:26 +01:00
Andy Wilkinson
ad629055fa Ensure that custom static resource locations end with /
Closes gh-9360
2017-06-06 11:39:04 +01:00
Phillip Webb
b9fd99e268 Polish 2017-06-02 13:47:28 -07:00
Stephane Nicoll
f11edd1eb3 Add missing @Configuration on EmbeddedDatabaseConfiguration 2017-06-02 17:42:18 +02:00
Andy Wilkinson
a347383111 Merge branch '1.4.x' into 1.5.x 2017-06-02 14:18:44 +01:00
Andy Wilkinson
bf656c70ad Improve MultipartProperties' javadoc
Closes gh-9073
2017-06-02 14:13:26 +01:00
Stephane Nicoll
c736a1698b Clarify default value of ConditionalOnMissingBean on bean methods
Closes gh-9387
2017-06-02 14:55:58 +02:00
Stephane Nicoll
b8591206d5 Polish 2017-05-29 11:49:46 +02:00
Stephane Nicoll
062dc3cb9a Upgrade to Neo4J OGM 2.1.3
Closes gh-9335
2017-05-29 11:48:55 +02:00
Stephane Nicoll
b5709fd618 Polish
See gh-9330
2017-05-28 17:44:58 +02:00
Stephane Nicoll
50876382db Improve Spring Session validation message
Closes gh-9284
2017-05-23 11:37:26 +02:00
Phillip Webb
440d03bf9e Merge branch '1.4.x' into 1.5.x 2017-05-15 15:59:08 -07:00
Phillip Webb
9a4a20537c Polish 2017-05-15 11:19:19 -07:00
Andy Wilkinson
fd2ab2fee0 Merge branch '1.4.x' into 1.5.x 2017-05-15 17:44:42 +01:00
Andy Wilkinson
198093c6a8 Fix violation reported by Checkstyle 2017-05-15 17:44:17 +01:00
Andy Wilkinson
5693acf558 Merge branch '1.4.x' into 1.5.x 2017-05-15 17:08:53 +01:00
Andy Wilkinson
a6f8351dd6 Close Liquibase-specific DataSource once database has been migrated
Previously, when the liquibase.url, .username, and .password
properties were used to configure a DataSource specifically for
Liquibase that DataSource would never be explicitly closed. As it is
created by DataSourceBuilder with no explicitly configured type it
will use whichever connection pool is available and, therefore, will
create and keep open the pool's minimum number of connections. This
is an unnecessary use of resources both in the application and in the
database.

This commit updates LiquibaseAutoConfiguration so that if it uses
DataSourceBuilder to create a DataSource then it will also close that
DataSource once the database has been migrated.

Closes gh-9218
2017-05-15 17:08:45 +01:00
Andy Wilkinson
a2e749940e Merge branch '1.4.x' into 1.5.x 2017-05-12 15:00:58 +01:00
Andy Wilkinson
a3f5cbc4a2 Polishing 2017-05-12 15:00:44 +01:00
Phillip Webb
4a7dcc8786 Formatting 2017-05-09 21:43:24 -07:00
Stephane Nicoll
e236b71615 Move RabbitMQ Simple listener support to dedicated namespace
Move `spring.rabbitmq.listener.*` to `spring.rabbitmq.listener.simple.*`
in preparation for Spring AMQP 2.0 that supports different container
types.

Closes gh-9108
See gh-9055
2017-05-05 10:03:47 +02:00
Stephane Nicoll
ea33cc2f7d Deprecated MustacheCompilerFactoryBean
Closes gh-8999
2017-05-03 13:09:52 +02:00
Stephane Nicoll
5121b848e1 Making sure to stop embedded web servers in tests
Closes gh-9012
2017-05-03 11:33:42 +02:00
Phillip Webb
76ee2f401c Polish 2017-04-28 09:48:13 -07:00
Phillip Webb
4db4c81b9b Polish 2017-04-28 09:38:56 -07:00
Stephane Nicoll
1de2316a0b Refine validator and MVC validator configuration
This commit ensures that a primary JSR 303 and Spring Validator will be
exposed if the auto-configuration kicks in. As `LocalValidatorFactoryBean`
exposes 3 contracts (JSR-303 `Validator` and `ValidatorFactory` as well as
the `Spring` validator one), this makes sure that those types can be
injected by type.

`LocalValidatorFactoryBean` exposes 3 contracts and we're only checking
for the absence of a `javax.validation.Validator` to auto-configure a
`LocalValidatorFactoryBean`. If no standard JSR validator exists but a
Spring's `Validator` exists and is primary, we shouldn't flag the
auto-configured one as `@Primary`. Previous iterations on this feature
have made sure that we'll auto-configure at most one
`javax.validation.Validator` so not flagging it `@Primary` is no problem.

This commit also restores and adds tests that validates
`ValidationAutoConfiguration` will configure a JSR validator even if a
Spring Validator is present.

This effectively fixes gh-8495 in a different way.

Closes gh-8979
Closes gh-8976
2017-04-28 11:41:42 +02:00
Stephane Nicoll
f42998f5ca Revert "Refine validator and MVC validator configuration"
This commit reverts c9561f0 and 69a8c0d and effectivly fixes gh-8979 but
reintroduces the issue reported in gh-8495.
2017-04-28 11:12:09 +02:00
Stephane Nicoll
3dc9b125d7 Merge branch '1.4.x' into 1.5.x 2017-04-27 14:30:40 +02:00
Stephane Nicoll
703a6dc056 Prevents BasicErrorControllerIntegrationTest to start another server
`BasicErrorControllerIntegrationTest` is handling the context in each test
and yet it starts a useless test via `@SpringBootTest`. This commit
removes the useless runner and associated annotations.
2017-04-27 14:26:50 +02:00
Spring Buildmaster
9768b0a8c2 Next Development Version 2017-04-21 08:32:01 +00:00
Phillip Webb
5f3d5fbec1 Remove public "skip path extension" constant
Remove the public constant to make it clearer that skipping path
extensions is really an internal Spring Boot concern.

See gh-8765
2017-04-20 13:31:04 -07:00
Phillip Webb
69a8c0d871 Fix MVC validator configuration warning
Replace the MVC validator post processor with an `@Import` so
that a "cannot enhance @Configuration bean definition"
warning does not occur.

Fixes gh-8951
See gh-8495
2017-04-20 11:57:18 -07:00
Spring Buildmaster
d719d2cbbc Next Development Version 2017-04-20 12:46:19 +00:00
Dave Syer
14638e67bc Extended PropertiesLauncher class location logic
Update `PropertiesLauncher` so that classes can be loaded outside of
`BOOT-INF/classes`. You can use a subdirectory, or the root directory
of an external jar (but not the parent archive to avoid issues
with agents and awkward delegation models).

Fixes gh-8480
Closes gh-8486
2017-04-19 22:18:12 -07:00
Phillip Webb
5abc050a96 Support detection and with test initializers
Relax `SpringBootTestContextBootstrapper` rules so that a test can
specify an `ApplicationContextInitializer` and still have
`@SpringBootConfiguration` detected.

Prior to this commit detection would not occur because it's possible
that an initializer _could_ register configuration. This scenario is
actually quite unlikely to occur, certainly less likely than wanting to
use an initializer in combination with auto-detection.

Fixes gh-8483
2017-04-19 22:18:12 -07:00
Phillip Webb
c9561f031c Refine validator and MVC validator configuration
Update `ValidationAutoConfiguration` and `WebMvcAutoConfiguration` to
ensure as much as possible that only a single Validator bean of each
type is registered.

Validation auto-configuration now does the following:
- If no validator is found: Registers a `LocalValidatorFactoryBean`
  (providing both Spring and JSR validation)
- If the user defines a Spring & JSR validator: Backs off
- If the user defines only a JSR validator: Adapts it to a Spring
  validator (without exposing another JSR implementation)

WebMvcAutoConfiguration auto-configuration has been updated to make
MVC validation follow common Spring Boot patterns:
- If not validator beans are found (due to the user excluding
  ValidationAutoConfiguration) a new `mvcValidator` bean will be
  registered.
- If a single validator bean is found it will be used for MVC
  validation.
- If multiple validator beans are defined it will either use the one
  named `mvcValidator` or it will register a new `mvcValidator` bean

Any automatically registered `mvcValidator` bean will not implement
the JSR validator interface.

Finally, it is no longer possible to provide an MVC validator via a
`WebMvcConfigurer`.

Fixes gh-8495
2017-04-19 22:18:12 -07:00
Andy Wilkinson
b9be0e3e0f Skip actuator path extension content negotiation
Allow `PathExtensionContentNegotiationStrategy` to be bypassed by
actuator endpoints. Prior to this commit calling `/loggers/com.aaa.cab`
would return a HTTP 406 response due to `.cab` being a known extension.

Fixes gh-8765
2017-04-18 14:56:11 -07:00
Walter Seymore
f5f65463d2 Fail fast on getKeyFromServer() failure
Update `ResourceServerTokenServicesConfiguration` to fail fast if the
`getKeyFromServer()` call fails. Since the key is part of the singleton
`JwtAccessTokenConverter` bean there is not real way to refresh without
restarting the application.

A hard failure seems preferable to an inconsistent state.

Closes gh-8924
2017-04-18 14:56:10 -07:00
Phillip Webb
b2ae6b5f50 Merge branch '1.4.x' into 1.5.x 2017-04-17 22:14:45 -07:00
Phillip Webb
cdf3eadc95 Rename AbstractTemplateAvailabilityProvider
Rename `AbstractTemplateAvailabilityProvider` to
`PathBasedTemplateAvailabilityProvider`.

Closes gh-8913
2017-04-17 22:12:44 -07:00
Stephane Nicoll
e1f727719a Merge branch '1.4.x' into 1.5.x 2017-04-14 16:04:22 +02:00
Stephane Nicoll
b7efec5401 Support case insensitive value for Cassandra's SchemaAction
Closes gh-8903
2017-04-14 16:04:04 +02:00
Stephane Nicoll
715cf7da75 Do not enable cglib if spring.aop.proxy-target-class is configured
This commit makes sure to honour the `spring.aop.proxy-target-class`
property if set by the user. Previously, the
`PersistenceExceptionTranslationPostProcessor` was always configured to
use cglib, regardless of the value of that property.

Closes gh-8887
2017-04-12 10:55:43 +02:00
Phillip Webb
c97268981a Polish 2017-04-11 20:59:03 -07:00
Phillip Webb
d301d0f4c3 Merge branch '1.4.x' into 1.5.x 2017-04-11 20:42:48 -07:00
Phillip Webb
758ddcd420 Polish 2017-04-11 20:17:23 -07:00
Stephane Nicoll
a00b695748 Do not enable cglib if spring.aop.proxy-target-class is configured
This commit makes sure to honour the `spring.aop.proxy-target-class`
property if set by the user. Previously, the
`MethodValidationPostProcessor` was always configured to use cglib,
regardless of the value of that property.

Closes gh-8869
2017-04-11 15:28:21 +02:00
Stephane Nicoll
a132bd141f Merge branch '1.4.x' into 1.5.x 2017-04-10 16:13:53 +02:00
Stephane Nicoll
0a55e3e736 Polish "Clarify edge case docs on ConditionalOnClass"
Closes gh-8185
2017-04-10 16:12:11 +02:00
Andy Wilkinson
035cbd91f4 Use main thread in OnClassCondition if thread create/start fails
Previously, as a result of the changes made in de50cfa21e, an
application would fail to start on Google AppEngine as it prevents
the creation of new threads.

This commit updates OnClassCondition so that it falls back to
performing the work on the main thread when its unable to shift it
to a separate thread.

Closes gh-8584
2017-04-10 15:09:21 +01:00
Phillip Verheyden
08f8219248 Clarify edge case docs on ConditionalOnClass
When used as a meta-annotation the value() attribute of
@ConditionalOnClass will fail silently resulting in the @Conditional
nature of the annotation being ignored.

See gh-8185
2017-04-10 15:58:17 +02:00
Andy Wilkinson
f6a7e17688 Merge branch '1.4.x' into 1.5.x 2017-04-10 13:45:41 +01:00
Andy Wilkinson
6564fb3d96 Consider all loader paths when checking template availability
Closes gh-8842
2017-04-10 13:37:32 +01:00
Stephane Nicoll
7c9b2afa5b Merge branch '1.4.x' into 1.5.x 2017-04-10 10:57:52 +02:00
Dr. Stefan Hüttemann
0294ad3e95 Allow to disable max http post size limit
Closes gh-8508
2017-04-10 10:54:20 +02:00
Andy Wilkinson
c74f0a70ca Merge branch '1.4.x' into 1.5.x 2017-04-07 12:14:47 +01:00
Andy Wilkinson
5dad7182db Address deprecation warnings 2017-04-07 12:01:01 +01:00
Phillip Webb
ad38776de3 Polish 2017-04-04 09:48:10 -07:00
Phillip Webb
ddcb5ee328 Polish 2017-04-04 09:36:27 -07:00
Andy Wilkinson
94e9c9417d Merge branch '1.4.x' into 1.5.x 2017-04-04 10:22:50 +01:00
Andy Wilkinson
b280e3092d Don't forward to welcome page that won't exist due to custom mapping
Previously, WelcomePageHandlerMapping would forward to index.html.
This assumed that the static path pattern was always /**. If it had
been customised to, for example, /foo/**, then the forward would still
be to index.html and a 404 would result as the page is actually
available at /foo/index.html.

At first glance, it would appear that the forward should be made to
foo/index.html. However, as it's a forward rather than a redirect,
any relative URLs in the index.html page would then be resolved using
/ whereas they should be resolved using /foo/. This could be addressed
by using a redirect rather than a forward, but we don't want to do
that as it's more invasive and would require a roundtrip back to the
client. Instead, this commit simply stops performing the forward when
the static path pattern is not /**.

Closes gh-8788
2017-04-04 10:13:24 +01:00
Stephane Nicoll
5cc2e103f2 Disable unexpected datasource initialization
This commit restore the disabling of datasource initialization that was
accidently removed in db33a75 so that other tests aren't affected by it.
2017-04-03 10:42:12 +03:00
Stephane Nicoll
0163731043 Automatically enable transaction management for Neo4j
This commit makes sure that `@EnableTransactionManagement` is
auto-configured with Neo4j. It actually reuses what was done in #8434,
making sure that the `Neo4jDataAutoConfiguration` is ordered properly.

Closes gh-8587
2017-04-03 09:37:37 +03:00
Stephane Nicoll
db33a75484 Enable transaction management consistently
Previously to this commit, transaction management was only enabled when
a `DataSource` is configured. The processing of `@Transactional`
annotations are now enabled as long as a `PlatformTransactionManager` is
present.

Also, the `spring.aop.proxy-target-class` is now honoured if set, still
defaulting to CGLIB mode.

Closes gh-8434
2017-04-03 09:24:15 +03:00
Stephane Nicoll
fa3679af71 Merge branch '1.4.x' into 1.5.x 2017-03-16 12:40:12 +01:00
Stephane Nicoll
cd76da9a4c Avoid using immutable collections for configuration proprerties
Closes gh-8620
2017-03-16 12:39:48 +01:00
Stephane Nicoll
22934e097d Merge branch '1.4.x' into 1.5.x 2017-03-15 15:10:37 +01:00
Vedran Pavic
17aad4f00c Improve RedisSessionConfiguration conditions
Closes gh-8582
2017-03-15 15:09:31 +01:00
Madhura Bhave
8deb72be80 Fix ResourceServerProperties validation
Only try and validate if clientId is present.

Fixes gh-8565
2017-03-14 11:03:21 -07:00
Stephane Nicoll
5d27c7e501 Handle non supported JOOQ dialect
This commit uses a fallback translator if the JOOQ Dialect in use is not
one we support.

Closes gh-8521
2017-03-10 16:27:44 +01:00
Stephane Nicoll
f8bf05b91f Polish contribution
Closes gh-8474
2017-03-10 10:20:48 +01:00
srichard
0ddaca57fb Add Tomcat Access Log's fileDateFormat property
Closes gh-8396
2017-03-10 09:57:00 +01:00
Stephane Nicoll
feb1ab375f Merge branch '1.4.x' into 1.5.x 2017-03-10 09:36:55 +01:00
Eddú Meléndez
251090b1e5 Add missing spring-data-cassandra metadata
This commit adds the missing
`spring.data.cassandra.repositories.enabled` in the metadata and the
documentation.

Closes gh-8562
2017-03-10 09:34:19 +01:00
Stephane Nicoll
6624fe47c3 Merge branch '1.4.x' into 1.5.x 2017-03-09 18:33:28 +01:00
Stephane Nicoll
e7922a574a Polish 2017-03-09 18:33:13 +01:00
Stephane Nicoll
207ab3ecb4 Merge branch '1.4.x' into 1.5.x 2017-03-09 18:21:40 +01:00
Stephane Nicoll
07c56c60ba Make sure Hazelcast bootstraps before any JCache setup
This commit makes sure that if a `javax.cache.CacheManager` is required,
an auto-configured `HazelcastInstance` is fully resolved first. This
prevents the case where the JCache bootstrap actually starts an instance
early, followed by a second (potentially unwanted) instance created by the
regular auto-configuration.

Since the JCache implementation works with an `HazelcastInstance` behind
the scenes, if there is one `HazelcastInstance` configured and it has a
name, then we configure the `CacheProvider` to use that. Future Hazelcast
version will allow to pass the instance directly (i.e. not requiring an
actual name).

Closes gh-8484
2017-03-09 17:59:20 +01:00
Phillip Webb
fedd7b9506 Polish 2017-03-06 12:01:05 -08:00
Phillip Webb
a3d5101369 Merge branch '1.4.x' into 1.5.x 2017-03-06 11:48:52 -08:00
Phillip Webb
f5aeac3658 Polish 2017-03-06 11:43:29 -08:00
Stephane Nicoll
28bba876fa Merge branch '1.4.x' into 1.5.x 2017-03-06 08:19:12 +01:00
Stephane Nicoll
9fb9a67c4b Avoid early initializations
This commit flags the two `BeanPostProcessors` registered by the
embedded support as `synthetic` so that they don't trigger an early
initialization of other components.

Closes gh-8467
2017-03-06 08:16:58 +01:00