Commit Graph

2437 Commits

Author SHA1 Message Date
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
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