Commit Graph

3049 Commits (61c6662b9cac92d9cb2cd662df9162ab07454039)

Author SHA1 Message Date
Stephane Nicoll cf88508e1d Avoid exposing `spring.resources.favicon-locations` as a property
Closes gh-9214
8 years ago
Brian Clozel d7ba7ecc48 Allow RouterFunction parameterized with different types
This commit allows *any* type of `RouterFunction` to be injected in the
WebFlux.fn auto-configuration; previously the `RouterFunction<T>` would
restrict injected beans to a single parameterized type.

Doing requires using the `RouterFunction.andOther` method to collect
them.

Fixes gh-9181
8 years ago
Brian Clozel 4a47c1eff8 Keep default Thymeleaf media types in reactive support
This commit removes the default configuration value previously set
for `spring.thymeleaf.reactive.media-types` since this value overrides
the defaults provided by Thymeleaf.

This value does not drive the default media type used by views, but
rather all media types that the templating engine should support.

Fixes gh-9134
8 years ago
Brian Clozel 89c284cb13 Add reactive websocket auto-configuration for Tomcat
This commit adds a `TomcatWebSocketReactiveWebServerCustomizer`
that customizes the Tomcat context to accept WebSockets connections.
Since reactive servers don't use the JSR 356 for that support,
only Tomcat customization is required for now.

This commit also reorders the server auto-configuration
so that undertow has a chance to be auto-configured before
reactor-netty, which should be a popular dependency thanks to
its HTTP client library.

The existing WebSocket infrastructure for Serlvet based containers
has been moved to a dedicated package and renamed accordingly.

Fixes gh-9113
8 years ago
Andy Wilkinson 9f55deeb95 Merge branch '1.5.x' 8 years ago
Andy Wilkinson a2e749940e Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson a3f5cbc4a2 Polishing 8 years ago
Andy Wilkinson 47807b8925 Upgrade to SendGrid 3.2.0
Closes gh-9211
8 years ago
Andy Wilkinson f24b55a236 Upgrade to Thymeleaf 3.0.6.RELEASE
Closes gh-9207
8 years ago
Andy Wilkinson b71daac58a Remove redundant logic for uninstalling Tomcat's URL stream handler factory
Closes gh-8622
8 years ago
Vedran Pavic 94f96a281f Improve `HashMapSessionConfiguration`
This commit updates `MapSessionRepository` bean definition return type
and applies equivalent change to `SessionAutoConfigurationTests`.

These changes also ensure compatibility with Spring Session 2.0 which
will merge `ExpiringSession` API with `Session` API.

Closes gh-9145
8 years ago
Andy Wilkinson 9ee1edcca5 Polishing 8 years ago
Andy Wilkinson 9480e09c21 Upgrade to Spring Security 5.0.0.M1
Closes gh-8714
8 years ago
Phillip Webb 5cad11d6d2 Formatting 8 years ago
Phillip Webb fd2e3b3505 Merge branch '1.5.x' 8 years ago
Phillip Webb 4a7dcc8786 Formatting 8 years ago
Stephane Nicoll 275bff39aa Remove deprecated code
Closes gh-8891
8 years ago
Stephane Nicoll 1e9c1a68e4 Remove deprecated spring.rabbitmq.listener.* properties
See gh-9055, gh-9108
8 years ago
Stephane Nicoll 2894e57146 Polish "Support direct AMQP container"
Closes gh-9055
8 years ago
Gary Russell 6eddf1b372 Support direct AMQP container
Add support for auto configuration - select container type and separate
discrete properties.

See gh-9055
8 years ago
Stephane Nicoll 0f38031f93 Merge branch '1.5.x' 8 years ago
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
8 years ago
Phillip Webb a841a6a11d Polish 8 years ago
Andy Wilkinson 525f421441 Update MultipartProperties' prefix to reflect that it's Servlet-specific
Closes gh-8628
8 years ago
Andy Wilkinson 9caf82ce80 Remove redundant ordering from ImportBeanDefinitionRegistrar implementations
Closes gh-8603
8 years ago
Stephane Nicoll 0aded58884 Polish "Add auto-configuration support for Hazelcast client"
Closes gh-7469
8 years ago
Vedran Pavic 3fbf1a2ea6 Add auto-configuration support for Hazelcast client
See gh-7469
8 years ago
Stephane Nicoll 5247fa323b Harmonize reactive auto-configuration class names
Closes gh-9086
8 years ago
Stephane Nicoll de268d97e2 Add auto-configuration for reactive Redis
This commit provides an auto-configuration for reactive Redis and a
starter that provides Lettuce as Jedis doesn't support reactive
operations.

There are no support for reactive redis repositories at the moment so
only a `ReactiveRedisTemplate` is auto-configured if necessary.

Closes gh-8053
8 years ago
Eddú Meléndez 1d9fa8395c Replace lambdas with method references
Closes gh-9049
8 years ago
Stephane Nicoll b0ffe18e15 Merge branch '1.5.x' 8 years ago
Stephane Nicoll ea33cc2f7d Deprecated MustacheCompilerFactoryBean
Closes gh-8999
8 years ago
Stephane Nicoll 2b4f2c6aba Making sure to stop embedded web servers in tests
Closes gh-9012
8 years ago
Stephane Nicoll 5121b848e1 Making sure to stop embedded web servers in tests
Closes gh-9012
8 years ago
Andy Wilkinson 4a00f90545 Stop throwing checked exception from @PostConstruct in ResourceServerProperties
Closes gh-8916
8 years ago
Phillip Webb 97dc2165b7 Polish 8 years ago
Madhura Bhave c04f28d9e5 Validate ResourceServerProperties in PostConstruct
Closes gh-8916
8 years ago
Stephane Nicoll 47783e258a Add missing tests 8 years ago
Stephane Nicoll e7efa8f133 Polish "Add Lettuce Redis driver autoconfiguration"
Closes gh-5311
8 years ago
Mark Paluch 4563da9ac7 Add Lettuce Redis driver autoconfiguration
Introduce an alternative autoconfiguration if the lettuce Redis driver is
available. Add Lettuce-specific configuration property options
"spring.redis.lettuce.shutdown-timeout" to control the shutdown timeout
of the lettuce driver. Add documentation for the properties, the
supported drivers, and how to switch between drivers.

Split client-specific properties from spring.redis.pool to
spring.redis.jedis.pool and introduce spring.redis.lettuce namespace.
Deprecate spring.redis.pool property.

See gh-5311
8 years ago
Phillip Webb 77d427af6c Fix occasional Jetty test failures
Update `DefaultServletWebServerFactoryCustomizerTests` so that the Jetty
access log tests use the default timezone. Prior to this commit it was
possible that running the tests outside of UTC could result in Jetty
throwing a "negative delay" IllegalArgumentException.

See gh-8819
8 years ago
Phillip Webb 3f71b8453f Migrate missed tests to new Binder
Migrate a few tests that were missed to use the new `Binder`.

See gh-9000
8 years ago
Phillip Webb 76593a3806 Merge branch '1.5.x' 8 years ago
Phillip Webb 72813a47e7 Polish 8 years ago
Phillip Webb 76ee2f401c Polish 8 years ago
Phillip Webb 4db4c81b9b Polish 8 years ago
Stephane Nicoll 7c4a1a221d Merge branch '1.5.x' 8 years ago
Brian Clozel f2c63706da Change default file extension for Mustache templates
This commit changes the default file extension for Mustache templates,
from `.html` to `.mustache`, which is the file extension used in the
official reference documentation and by most IDE plugins.

Fixes gh-8997
8 years ago
Brian Clozel 4d5dcca553 Add Thymeleaf auto-configuration for WebFlux
Thymeleaf 3.0 implements the Spring 5.0 view infrastructure for WebMVC
and the new WebFlux framework. This commit adds auto-configuration for
the WebFlux support.

In that process, the configuration property for `spring.thymeleaf` has
been changed to add `spring.thymeleaf.servlet` and
`spring.thymeleaf.reactive` for MVC/WebFlux specific properties.

Now that the `spring-boot-starter-thymeleaf` does not only support
Spring MVC, the transitive dependency on `spring-boot-starter-web` is
removed from it.

Fixes gh-8124
8 years ago
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
8 years ago
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.
8 years ago
Stephane Nicoll d4f87ae74e Polish 8 years ago
Phillip Webb df9d2bc9f4 Remove @ConditionalOnProperty 'relaxed' attribute
Remove the `relaxed` attribute from `@ConditionalOnProperty` and instead
rely on the direct configuration property source relaxed name support.

Closes gh-9003
8 years ago
Madhura Bhave 69ab2e462e Use new configuration properties in autoconfigure
Update `spring-boot-autoconfigure` to use the new configuration
properties support.

See gh-9000
8 years ago
Phillip Webb 82b839e4fb Polish OnWebApplicationCondition message 8 years ago
Phillip Webb 45dd9f7144 Polish 8 years ago
Phillip Webb 42e24136ef Drop `spring-social-web-thymeleaf3`
Drop `spring-social-web-thymeleaf3` dependency since it's been merged
into `spring-social-web` as of Spring Social 2.0.

Fixes gh-9017
8 years ago
Vedran Pavic 33dd9d6d84 Remove Spring Session Mongo support
Remove auto-configuration support for Spring Session Mongo since it is
no longer supported in Spring Session 2.0.

See gh-9011
8 years ago
Stephane Nicoll 800eb010b1 Change the default JDBC connection pool to Hikari
Closes gh-6013
8 years ago
Stephane Nicoll 3dc9b125d7 Merge branch '1.4.x' into 1.5.x 8 years ago
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.
8 years ago
Stephane Nicoll 227bcf44da Create jetty access log file in the temp directory 8 years ago
Stephane Nicoll 66298d85c4 Fix build 8 years ago
Stephane Nicoll e9abe3fcca Polish "Do not expose `exception` error attribute by default"
Closes gh-8971
8 years ago
Vedran Pavic afe0c6f432 Do not expose `exception` error attribute by default
See gh-8971
8 years ago
Stephane Nicoll f5db75792e Add support for configuring Jetty's request log via the environment
Closes gh-8819
8 years ago
olivier lamy ce892a06e4 Add support for configuring Jetty's request log via the environment
See gh-8819
8 years ago
Stephane Nicoll 45f76965f6 Rename cassandra bean names
Closes gh-8982
8 years ago
Stephane Nicoll 47037d5227 Polish "Add reactive support for Spring Data Cassandra"
Closes gh-8568
8 years ago
Eddú Meléndez abd35f041b Add reactive support for Spring Data Cassandra
See gh-8568
8 years ago
Madhura Bhave bc1ee76b55 Change default for new_generator_mappings to true
Closes gh-7612
8 years ago
Phillip Webb 1ad318d8a6 Refine Mustache support
Refine Mustache support to provide a cleaner separation between the
reactive and servlet implementations. The views have now moved to the
`spring-boot` project and the auto-configuration has been split into
two distinct `@Imports` to save needing full package declarations.

See gh-8941
8 years ago
Phillip Webb 06558675bb Polish 8 years ago
Brian Clozel ec25e51f1f Refactor Mustache views support in Spring MVC
This commit simplifies the Mustache support for Spring MVC and removes
the included (view-based) i18n support in favor of more idiomatic
constructs like Mustache lambdas.

Fixes gh-8941
8 years ago
Brian Clozel 7e77e648bf Add Mustache support for Spring WebFlux apps
This commit moves the existing Spring MVC Mustache support to its own
`servlet` package and adds a new one under `reactive` for the WebFlux
web applications.

New `MustacheView` and `MustacheViewResolver` types resolve and render
Mustache views for WebFlux applications.

Since this templating engine is now supported by two flavors of Spring
web apps, the `spring-boot-starter-mustache` does not depend anymore on
the `spring-boot-starter-web` one: it's up to the developer to add the
relevant starter `web` or `webflux` to their application.

Fixes gh-8648
8 years ago
Madhura Bhave c2e5fd031a Replace usage of WebMvcConfigurerAdapter
Closes gh-8964
8 years ago
Phillip Webb 28d6881118 Formatting 8 years ago
Stephane Nicoll 3e60ec6cb4 Polish "Add database initializer for Spring Integration"
Closes gh-8881
8 years ago
Vedran Pavic 48bc29c77a Add database initializer for Spring Integration
See gh-8881
8 years ago
Stephane Nicoll 50b3b3025a Fix broken build 8 years ago
Stephane Nicoll 144868a3ce Polish "Support of Neo4j auto-index configuration"
Closes gh-8843
8 years ago
Aurélien Leboulanger 779733c379 Support of Neo4j auto-index configuration
See gh-8843
8 years ago
Spring Buildmaster 9768b0a8c2 Next Development Version 8 years ago
Phillip Webb 9981ae6874 Rename WebFluxAnnotationAutoConfiguration
Rename WebFluxAnnotationAutoConfiguration to WebFluxAutoConfiguration
to better align with Spring MVC.
8 years ago
Phillip Webb 99a3ec8b74 Merge branch '1.5.x' 8 years ago
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
8 years ago
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
8 years ago
Spring Buildmaster d719d2cbbc Next Development Version 8 years ago
Phillip Webb 81fef71fcb Merge branch '1.5.x' 8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
Phillip Webb 94209e2883 Merge branch '1.5.x' 8 years ago
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
8 years ago
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
8 years ago
Phillip Webb 383640d5ec Merge branch '1.5.x' 8 years ago
Phillip Webb b2ae6b5f50 Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb cdf3eadc95 Rename AbstractTemplateAvailabilityProvider
Rename `AbstractTemplateAvailabilityProvider` to
`PathBasedTemplateAvailabilityProvider`.

Closes gh-8913
8 years ago
Stephane Nicoll 92468d4ffc Merge branch '1.5.x' 8 years ago
Stephane Nicoll e1f727719a Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll b7efec5401 Support case insensitive value for Cassandra's SchemaAction
Closes gh-8903
8 years ago
Brian Clozel 23360d11a2 Change codec auto-configuration in HandlerStrategies
Since SPR-15415 and SPR-15435, the HandlerStrategies and its companion
builder are now using the new CodecConfigurer infrastructure to
configure codecs in a cross-cutting way.

This commit looks for a custom instance of `HandlerStrategies.Builder`
provided by the user, or create a default one if none was found.

Fixes gh-8897
8 years ago
Stephane Nicoll eeed3a841c Review configuration properties appendix 8 years ago
Stephane Nicoll 5114c9d651 Polish "Handle null value in OnExpressionCondition"
Closes gh-8128
8 years ago
tinexw ccf1800116 Handle null value in OnExpressionCondition
Closes gh-2886
8 years ago
Stephane Nicoll 036157aeae Polish "Use JDK hashCode() variants for primitives"
Closes gh-8768
8 years ago
dreis f3bbbc4530 Use JDK hashCode() variants for primitives
See gh-8768
8 years ago
Stephane Nicoll d3f180b664 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll 2f2b1a0e8f Polish 8 years ago
Stephane Nicoll bcb13bea63 Split JPA-specific bits of Batch auto-config
This commit separates the JPA-specific bits of the batch
auto-configuration so that it is possible to reuse most of the logic if
JPA isn't available at all.

Closes gh-8877
8 years ago
Phillip Webb c4cba6b0ea Merge branch '1.5.x' 8 years ago
Phillip Webb c97268981a Polish 8 years ago
Phillip Webb d301d0f4c3 Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb 758ddcd420 Polish 8 years ago
Stephane Nicoll bd28de09b0 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll 134e93f3fd Fix API change in latest snapshot 8 years ago
Stephane Nicoll 2bdbe343df Merge branch '1.5.x' 8 years ago
Stephane Nicoll a132bd141f Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll 0a55e3e736 Polish "Clarify edge case docs on ConditionalOnClass"
Closes gh-8185
8 years ago
Andy Wilkinson aacdeaea4e Merge branch '1.5.x' 8 years ago
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
8 years ago
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
8 years ago
Andy Wilkinson 5ac5aa3e9a Merge branch '1.5.x' 8 years ago
Andy Wilkinson f6a7e17688 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 6564fb3d96 Consider all loader paths when checking template availability
Closes gh-8842
8 years ago
Stephane Nicoll bc340002cf Merge branch '1.5.x' 8 years ago
Stephane Nicoll 7c9b2afa5b Merge branch '1.4.x' into 1.5.x 8 years ago
Dr. Stefan Hüttemann 0294ad3e95 Allow to disable max http post size limit
Closes gh-8508
8 years ago
Andy Wilkinson c74f0a70ca Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 5dad7182db Address deprecation warnings 8 years ago
Andy Wilkinson f0c5372642 Align with Spring Framework 5's new Commons Logging adapter
Closes gh-8825
8 years ago
Vedran Pavic 2667b7f51c Upgrade to Hazelcast 3.8
Closes gh-8808
8 years ago
Phillip Webb 2de7e9c310 Merge branch '1.5.x' 8 years ago
Phillip Webb ad38776de3 Polish 8 years ago
Phillip Webb ddcb5ee328 Polish 8 years ago
Andy Wilkinson 09898308ab Update autoconfigure's test deps to align with latest spring-kafka-test 8 years ago
Stephane Nicoll 78845fe63a Switch default value of spring.aop.proxy-target-class
This commit ensures that the default proxying value matches the opinion we
have applied for `@EnableTransactionManagement`

Closes gh-8786
8 years ago
Andy Wilkinson 6c6b9c284d Upgrade to Solr 6.5 and align with latest Spring Data Solr snapshots
Closes gh-8801
8 years ago
Andy Wilkinson 7f870aa19a Merge branch '1.5.x' 8 years ago
Andy Wilkinson 94e9c9417d Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Stephane Nicoll 3915f37dae Merge branch '1.5.x' 8 years ago
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.
8 years ago
Stephane Nicoll 4c32d6a7de Merge branch '1.5.x' 8 years ago
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
8 years ago
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
8 years ago
Andy Wilkinson f52b0b975a Update WebFlux auto-configuration following recent API changes 8 years ago
Brian Clozel df2d6b370e Fix compilation error with latest webflux changes
See commit c5bcefbd in Spring Framework, which refactored
the RequestMappingHandlerAdapter.
8 years ago
Andy Wilkinson aaf76e435e Align with latest Neo4j OGM 3.0 snapshots
See gh-8687
8 years ago
Johnny Lim 287520a810 Polish
Closes gh-8698
8 years ago
Andy Wilkinson d322d8613b Upgrade to Flyway 4.1.2
Closes gh-8752
8 years ago
Madhura Bhave 0ab7c25d9f Revert "Change default for new_generator_mappings to true"
This reverts commit 735dbc4583.
8 years ago
Andy Wilkinson e0a80c287c Remove Tomcat 7.0 and 8.0-based WebSocket support
Closes gh-8615
8 years ago
Madhura Bhave 735dbc4583 Change default for new_generator_mappings to true
Closes gh-7612
8 years ago
Andy Wilkinson a9a31107cf Align with API changes in latest Spring Data Kay snapshots
See gh-7461
8 years ago
Andy Wilkinson 87ebec6838 Upgrade to Jackson 2.9.0.pr2
As part of the upgrade, this commit removes the use of any API that
has been deprecated in 2.9. This includes the config props endpoint's
use of SerializationFeature.WRITE_NULL_MAP_VALUES. This has been
replaced with configuring serialization inclusion to only include
properties with non-null values. This means that all null-valued
properties will no longer be serialized, not just those that are an
entry in a map.

Closes gh-8604
Closes gh-8537
Closes gh-7695
8 years ago
Andy Wilkinson 25bf4a14cd Start building against Neo4j OGM 3.0.0 snapshots
This commit our Neo4j OGM dependency with the Spring Data Neo4j
snapshots that are currently included in snapshots of Spring Data Kay.

It switches to using Neo4j's Bolt driver by default, aligning it with
the default of the latest Spring Data Neo4j 5 snapshots.

It also contains a workaround for a Neo4j OGM issue [1] and a change
to Neo4jDataAutoConfigurationTests that prevents the entire classpath
from being scanned.

See gh-8687

[1] https://github.com/neo4j/neo4j-ogm/issues/340
8 years ago
Phillip Webb 34de119eba Polish 8 years ago
Stephane Nicoll da7287322b Polish 8 years ago
Stephane Nicoll b7d3aad54b Merge branch '1.5.x' 8 years ago
Stephane Nicoll fa3679af71 Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll cd76da9a4c Avoid using immutable collections for configuration proprerties
Closes gh-8620
8 years ago
Andy Wilkinson 1893fdab0d Revert "Upgrade to Jackson 2.9.0.pr1"
This reverts commit 10ae5e8f3f. Health
serialization fails with Jackson 2.9.0 (gh-7695).

See gh-8537
8 years ago
Andy Wilkinson 10ae5e8f3f Upgrade to Jackson 2.9.0.pr1
As part of the upgrade, this commit removes the use of any API that
has been deprecated in 2.9.0.pr1. This includes the config props
endpoint's use of SerializationFeature.WRITE_NULL_MAP_VALUES. This
has been replaced with configuring serialization inclusion to only
include properties with non-null values. This means that all
null-valued properties will no longer be serialized, not just those
that are an entry in a map.

Closes gh-8604
Closes gh-8537
8 years ago
Stephane Nicoll 7ee5e43109 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 22934e097d Merge branch '1.4.x' into 1.5.x 8 years ago
Vedran Pavic 17aad4f00c Improve `RedisSessionConfiguration` conditions
Closes gh-8582
8 years ago
Johnny Lim a3d15ed222 Polish
Closes gh-8621
8 years ago
Phillip Webb b76ca0bf8f Restructure web auto-configuration
Restructure `org.springframework.boot.autoconfigure.web` to better align
with the new package structure in `spring-boot`.

Auto-configuration is now split into client, servlet and reactive
sub-packages. In addition a new `http` package now handles common
HTTP concerns.

Fixes gh-8616
8 years ago
Phillip Webb 33e54ed723 Relocate `org.springframework.boot.web.support`
Move `org.springframework.boot.web.support` under the `servlet` package.

Fixes gh-8557
8 years ago
Phillip Webb 099e188f9f Unify WebServerFactoryCustomizers
Replace `ReactiveWebServerCustomizer` and `WebServerFactoryCustomizer`
with a unified `WebServerFactoryCustomizer`.

Fixes gh-8558
8 years ago
Phillip Webb 13db69bf41 Drop superfluous `@Order` annotation
Remove `@Order` which has no effect on `ImportBeanDefinitionRegistrar`.

Fixes gh-8603
8 years ago
Phillip Webb 4100360ceb Make ReactiveWebServerFactory functional interface
Update `ReactiveWebServerFactory` to contain only a single method.

Fixes gh-8559
8 years ago
Phillip Webb 69b72874ea Extract logging listeners
Separate logging ApplicationListeners classes to a different package
so that the root `logging` package is no longer aware of `context`
concerns.

Fixes gh-8611
8 years ago
Madhura Bhave 517b30acbb Merge branch '1.5.x' 8 years ago
Madhura Bhave 8deb72be80 Fix ResourceServerProperties validation
Only try and validate if clientId is present.

Fixes gh-8565
8 years ago
Phillip Webb 67556ba8ea Restructure embedded web server packages
Rework `org.springframework.boot.context.embedded` to relocate classes
to `org.springframework.boot.web`. Packages are now organized around
the following areas:

Packages for shared concerns, for example the `WebServer` interface
to start/stop a server and the common configuration elements:
- org.springframework.boot.web.context
- org.springframework.boot.web.server

Servlet specific packages:
- org.springframework.boot.web.servlet.server
- org.springframework.boot.web.servlet.context
- org.springframework.boot.web.servlet.filter

Reactive specific packages:
- org.springframework.boot.web.reactive.context
- org.springframework.boot.web.reactive.server

Embedded server implementations (both reactive and servlet):
- org.springframework.boot.web.embedded

In addition:

- Rename `EmbeddedServletContainerFactory` to `ServletWebServerFactory`
  to align with the `ReactiveWebServerFactory`.
- Rename `EmbeddedWebApplicationContext` to
  `ServletWebServerApplicationContext` and
- Rename `EmbeddedReactiveWebApplicationContext` to
  `ReactiveWebServerApplicationContext`.
- Add checkstyle rules to restrict imports.
- Fixup all affected code to use the correct imports and local names.

Fixes gh-8532
8 years ago
Phillip Webb b1f679b1c5 Fix HttpHandlerAutoConfiguration
Fix HttpHandlerAutoConfiguration following upstream Spring Framework
changes.
8 years ago
Stephane Nicoll 4f7e5efac8 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll 5ca197b5b6 Merge branch '1.5.x' 8 years ago
Stephane Nicoll f8bf05b91f Polish contribution
Closes gh-8474
8 years ago
srichard 0ddaca57fb Add Tomcat Access Log's fileDateFormat property
Closes gh-8396
8 years ago
Stephane Nicoll abef1ee4db Merge branch '1.5.x' 8 years ago
Stephane Nicoll feb1ab375f Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Stephane Nicoll 6624fe47c3 Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll e7922a574a Polish 8 years ago
Stephane Nicoll 68ef19b69b Merge branch '1.5.x' 8 years ago
Stephane Nicoll 207ab3ecb4 Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Johnny Lim 709ee23255 Polish
Closes gh-8526
8 years ago
Phillip Webb d8f827d224 Cleanup and format code 8 years ago
Phillip Webb 425dbc3e52 Update copyright header for edited files 8 years ago
Phillip Webb 2a592103f0 Polish formatting 8 years ago
Phillip Webb 91a7bf92e6 Merge branch '1.5.x' 8 years ago
Phillip Webb fedd7b9506 Polish 8 years ago
Phillip Webb a3d5101369 Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb f5aeac3658 Polish 8 years ago
Stephane Nicoll 546338ac80 Avoid early initializations for reactive support
This commit flags the `BeanPostProcessor` registered by the reactive
embedded support as `synthetic` so that it doesn't trigger an early
initialization of other components.

See gh-8467
8 years ago
Stephane Nicoll 36d6ab41a2 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 28bba876fa Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Spring Buildmaster d23fa24340 Next Development Version 8 years ago
Spring Buildmaster 2a83e80a9b Next Development Version 8 years ago
Andy Wilkinson edc2facd7a Merge branch '1.5.x' 8 years ago
Andy Wilkinson 9e9f006720 Polish "Enable customization of RestTemplate that retrieves JwtAccessTokenConverter's key"
See gh-8268
See gh-5859
8 years ago
Eddú Meléndez dc9ff73805 Enable customization of RestTemplate that retrieves JwtAccessTokenConverter's key
Closes gh-8268
See gh-5859
8 years ago
Stephane Nicoll 2e1cda8743 Merge branch '1.5.x' 8 years ago
Stephane Nicoll d74af04724 Rename JSR 303 Validator bean name
Closes gh-8481
8 years ago
Stephane Nicoll 28a8e3db2f Remove spring.cache.hazelcast.config
Remove the creation of a separate `HazelcastInstance` specific to caching.
Instead, the general `HazelcastAutoConfiguration` is used and if a
`HazelcastInstance` bean is present we wrap it in a `CacheManager`.

Closes gh-8470
8 years ago
Stephane Nicoll d811b5fb1d Merge branch '1.5.x' 8 years ago
Stephane Nicoll bb8800a625 Deprecate spring.cache.hazelcast.config
The additional configuration for an `HazelcastInstance` will be removed
in 2.0. This commit makes sure that the property is deprecated in 1.5

See gh-8470
8 years ago
Vedran Pavic 1c789f1a8d Remove dependency management for `hibernate-entitymanager`
Closes gh-8433
8 years ago
Andy Wilkinson 5285a8db44 Merge branch '1.5.x' 8 years ago
Madhura Bhave 605b0aefc6 Simplify validation logic in ResourceServerProperties
Closes gh-8306
Closes gh-8317
8 years ago
Stephane Nicoll cb40ea485b Merge branch '1.5.x' 8 years ago
Stephane Nicoll 3e0e4e81b9 Polish 8 years ago
Stephane Nicoll 5cc569fc91 Improve execution speed of `CacheAutoConfigurationTests`
As of Hazelcast 3.7, the bootstrap is pretty slow by default due to the
networking discovery. This commit disables both TCP/IP and multicast
discoveries.
8 years ago
Stephane Nicoll 5278baca01 Polish 8 years ago
Stephane Nicoll ea18fe58e4 Remove useless checked exception throw clause 8 years ago
Stephane Nicoll ad9d912009 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 0d61f92479 Ignore URI when local.mongo.port is set
This commit makes sure that if `local.mongo.port` is set, a `MongoClient`
on the embedded MongoDB instance is created. When an embedded instance
is detected, only the `host` property is used and the `uri` is ignored if
set.

This makes sure that the auto-configured `MongoClient` automatically
switches to the embedded server, even if a production uri has been
specified.

Closes gh-8219
8 years ago
Phillip Webb 58ac67eb27 Merge branch '1.5.x' 8 years ago
Phillip Webb 3ee7dae09b Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb f1012c104a Polish 8 years ago
Phillip Webb 987b6c956e Polish 8 years ago
Phillip Webb 57111aba22 Get published DataSource from EntityManager
Update DataSourceInitializedPublisher to always attempt to obtain the
published DataSource directly from the EntityManager. In the case where
the EntityManager doesn't provide a DataSource, the previous logic is
used.

Fixes gh-8296
8 years ago
Andy Wilkinson 205faa1950 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 70472b36f1 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 59d3a79c82 Avoid eager initialization when finding beans by annotation
Closes gh-8269
8 years ago
Andy Wilkinson 373474f8f6 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 4390c81115 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 8a326a8713 Simplify BeanTypeRegistry by requiring a DefaultListableBeanFactory
Closes gh-8439
8 years ago
Stephane Nicoll cf64d9fd35 Reuse auto-configured `Validator` in WebFlux
This commit makes sure that if a `Validator` is auto-configured, it is
reused as the `webFluxValidator`. This is pretty much the same thing as
what was done recently for Spring MVC.

Since the infrastructure is now shared, the package protected class has
been published in the `.validation` package.

Closes gh-8400
8 years ago
Stephane Nicoll deaa6089b0 Move `HttpHandler` configuration to a dedicated auto-configuration
An `HttpHandler` bean must be provided once the infrastructure triggered
by `@EnableWebFlux` has been processed. Rather than creating a
`HttpHandler` in that auto-configuration, this commit moves it to a
dedicated auto-config, like we do for `DispatcherServlet` for
servlet-based webapps.

As this is the only bean we auto-configure in a functional fashion, the
`WebFluxFunctionalAutoConfiguration` is now merged with this new
auto-configuration, making its purposes clearer.

Cloess gh-8436
8 years ago
Phillip Webb a4bcd20b64 Merge branch '1.5.x' 8 years ago
Phillip Webb ca1540cefe Update header copyright for changed files 8 years ago
Phillip Webb 77f6ed8357 Further rework Spring MVC JSR-303 validation
Rework Spring MVC JSR-303 validation support a little more to move
most of the creation logic to the wrapper class. Also rename
`SpringValidatorAdapterWrapper` -> `WebMvcValidator`.

See gh-8223
8 years ago
Phillip Webb 7ed1a26c2d Fix test failures when running in Eclipse
Update MultipartAutoConfigurationTests to reset the Tomcat URL factory.
8 years ago
Phillip Webb 5867cd6175 Polish 8 years ago
Phillip Webb 47b00c086c Polish 8 years ago
Stephane Nicoll d1d70b0207 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll c333ccfe20 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll c5595f296c Add support for Mock test with WebFlux
This commit add mock support for WebFlux with an infrastructure similar
to what `WebMvcTest` provides. `@WebFluxTest` can be used to test
controllers with a narrowed classpath that is relevant to WebFlux. Also,
`@SpringBootTest` now starts WebFlux in "mock" mode by default and
`@AutoConfigureWebTestClient` can be used to inject a `WebTestClient`
connected to the `ApplicationContext`.

To make that happen, a `ReactiveWebApplicationContext` interface has been
introduced to mirror what `WebApplicationContext` currently does. Things
are still a bit volatile at this point and that infra may move to Spring
Framework at some point.

Closes gh-8401
8 years ago
Brian Clozel 3a8be10be8 Enable Tomcat, Jetty and Undertow reactive auto-conf
Closes gh-8403
8 years ago
Stephane Nicoll f1d4d8434b Hide javax.servlet.SessionTrackingMode
The server's session can now be configured in both a servlet and a
reactive environment. The latter has not requirement on the servlet API
and this commit removes the requirement to the `SessionTrackingMode`
enum.

Closes gh-8402
8 years ago
Brian Clozel 8317977e1b Add WebFlux auto-configuration
This commit creates auto-configuration classes for both the
annotation and functional variants of the WebFlux framework.

They provide the basic support to get started with those, by
creating the required `HttpHandler` using the provided application
context (for annotation) or `RouterFunction`s (for functional).

They do support `WebFilter` registration and a few advanced
features such as resource handling, `messageReaders|Writers`
and `ViewResolver` auto-registration.

Closes gh-8386
8 years ago
Brian Clozel 656b509f03 Add support for reactive web servers auto-configuration
This commit adds the auto-configuration for creating reactive
`EmbeddedWebServer` instances. This adds support for the
following servers: Reactor Netty, Tomcat, Jetty and Undertow.

Fixes gh-8302
Fixes gh-8117
8 years ago
Brian Clozel 0b162e894b Manage EmbeddedWebServer in ReactiveWebApplicationContext
This commit adds an `EmbeddedWebServer` instance to the
`ReactiveWebApplicationContext` and ties it to the application
lifecycle.

To launch a reactive web application, two elements are required
from the context:

* a `ReactiveWebServerFactory` to create a server instance
* a `HttpHandler` instance to handle HTTP requests

Closes gh-8337
8 years ago
Brian Clozel f331ac133f Add reactive web server infrastructure
This commit adds the infrastructure for creating and customizing
reactive embedded web servers. Common configuration has been refactored
into the new `ConfigurableEmbeddedWebServer` interface.

See gh-8302
8 years ago
Stephane Nicoll a38d2456c3 Merge branch '1.5.x' 8 years ago
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
8 years ago
Andy Wilkinson 4ff159adbe Merge branch '1.5.x' 8 years ago
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
8 years ago
Dave Syer c544aff72f Merge remote-tracking branch 'origin/1.5.x' 8 years ago
Dave Syer 0f42c5dd94 Check there is only one ResourceServerConfiguration before modifying
Fixes gh-8347
8 years ago
Madhura Bhave b8a38d60b7 Merge branch '1.5.x' 8 years ago
Madhura Bhave 67810abd9e Match ResourceServerCondition if JWK config present
Closes gh-8350
8 years ago
Stephane Nicoll 91009cfc01 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 43a534f4ca Polish contribution
Closes gh-8195
8 years ago
Mathieu Ouellet fa8f0a6136 Add schema validation options for embedded LDAP
See gh-8195
8 years ago
Stephane Nicoll 4304cdb91a Merge branch '1.5.x' 8 years ago
Stephane Nicoll f57ddff478 Remove dead code
Closes gh-8305
8 years ago
Madhura Bhave b4134e239e Add autoconfiguration for JWKTokenStore
If `jwk.key-set-uri` is present.

Closes gh-4437
8 years ago
Andy Wilkinson 04a87ee4c1 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 01729cc1d2 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 9e1238e286 Consider resource loader path when checking Groovy template availability
Closes gh-8304
8 years ago
Andy Wilkinson 57fe8b966e Use Spring Session's defaults for its filter's dispatcher types
Closes gh-8288
8 years ago
Andy Wilkinson fe6320db42 Align Security filter dispatcher types with Spring Security's defaults
Closes gh-8289
8 years ago
Stephane Nicoll ce6372c46f Add support of reactive repositories with `@DataMongoTest`
Closes gh-8280
8 years ago
Stephane Nicoll 50553137d3 Merge branch '1.5.x' 8 years ago
Stephane Nicoll a0ef61a27d Enable proxy target class for `MethodValidationPostProcessor`
Closes gh-8277
8 years ago
Andy Wilkinson f9015be619 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll b30d4303d5 Polish contribution
Closes gh-8230
8 years ago
Mark Paluch 48b0f1577b Provide a starter for reactive Spring Data MongoDB
Add autoconfiguration to bootstrap MongoDB Reactive Streams driver
components, reactive Spring Data MongoDB and reactive repositories. Add
bean dependency processor for flapdoodle so embedded MongoDB instances
are configured before bootstraping the reactive MongoDB client.

Add Spring Data MongoDB Reactive starter with blocking and non-blocking
dependencies. MongoDB requires a separate driver that is used in the
`ReactiveMongoTemplate` while `MappingMongoConverter` (shared amongst
blocking/reactive Template API) requires the blocking driver to resolve
DBRefs.

See gh-8230
8 years ago
Andy Wilkinson 16b7bf7f73 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 601c6aa305 Tidy up code formatting and address some compiler warnings 8 years ago
Andy Wilkinson df08863641 Make ServletRegistrationBean and FilterRegistration bean generic
Closes gh-7666
8 years ago
Stephane Nicoll 064faf9560 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll cea64f6a32 Merge branch '1.5.x' 8 years ago
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
8 years ago
Brian Clozel aeef41c977 Separate container customization from ServerProperties
This commit creates a separate
`ServerPropertiesServletContainerCustomizer` that holds the servlet
container customization code, separating that concern from the server
configuration keys.

See gh-8066
8 years ago
Stephane Nicoll 8899b93de0 Merge branch '1.5.x' 8 years ago
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
8 years ago
Andy Wilkinson e891fe0584 Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Brian Clozel 12d883f6b9 Introduce "server.servlet" configuration prefix
This commit refactors the `ServerProperties` property keys and
introduces a separate "server.servlet" namespace to isolate
servlet-specific properties from the rest.

Closes gh-8066
8 years ago
Stephane Nicoll a31a792192 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 130e0808d0 Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll 008aef6142 Document @LiquibaseDataSource feature
Closes gh-8214
8 years ago
Stephane Nicoll f41801ee8c Narrow down ConditionalOnWebApplication
Use the new `type` attribute of `@ConditionalOnWebApplication` for the
configurations that have a hard dependency on the Servlet/MVC API.

See gh-8118
8 years ago
Stephane Nicoll 8e6f1218e1 Detect Reactive web applications
This commit improves `@ConditionalOnWebApplication` to specify the
requested web application type. By default, any web application will
match but it can also match only if a recactive (or servlet) web
application is present.

Closes gh-8118
8 years ago
Stephane Nicoll b2ec03cd4e Restore couchbase support
This commit effectively reverts the changes that were applied to
workaround the breakage in spring-data-couchbase.

Closes gh-8200
8 years ago
Stephane Nicoll 5f2bd1667b Merge branch '1.5.x' 8 years ago
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
8 years ago
Brian Clozel 8619d6a229 Rename EmbeddedServletContainer -> EmbeddedWebServer
This contract is not specific to servlet containers and should be
reused by all web server implementations (including reactive variants).

Fixes gh-8208
8 years ago
Andy Wilkinson 457d0414ea Make ConditionalOnBean a logical AND rather than an OR
Previously ConditionalOnBean was the inverse of
ConditionalOnMissingBean. This meant that the former was a logical OR
while the latter was a logical AND of the requiremnts declared via the
annotation's attributes.

This commit changes the logic for ConditionalOnBean so that it is now
a logical AND. A side-effect of this change is that more information
about what has and has not matched must be tracked during the
evaluation. This extra information is now used to provide more
informative messages in the condition evaluation report that indicate
exactly why @ConditionalOnBean or @ConditionalOnMissingBean did not
match.

Closes gh-5279
8 years ago
Stephane Nicoll 3c6d630a62 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 519a03ccda Polish 8 years ago
Johnny Lim 09998d1155 Fix ImportAutoConfigurationImportSelectorTests.determineImportsWhenUsingNonMetaWithClassesShouldBeSame()
Closes gh-8204
8 years ago
Stephane Nicoll 6af6e8e31b Remove auto-configuration for ServerProperties
This commit removes `ServerProperties` and `ManagementServerProperties`
auto-configurations. Those properties objects are now created using
`@EnableConfigurationProperties` only.

Closes gh-8108
8 years ago
Stephane Nicoll 98d2ed85e4 Fix broken build
Fix couchbase support until a solution is determined for
https://jira.spring.io/browse/DATACOUCH-279

See gh-8200
8 years ago
Stephane Nicoll cfdc75d384 Merge branch '1.5.x' 8 years ago
Johnny Lim 0adab8a2be Use logical 'and' instead of bitwise 'and'
Closes gh-8198
8 years ago
Tommy Ludwig 653366d664 Remove HikariCP-java6 dependency management
Dependency management for the `HikariCP-java6` dependency is no longer
needed since Java 6 is no longer supported by Spring Boot.

The HikariDriverConfigurationFailureAnalyzer has been updated with the
current message thrown by HikariCP in this failure scenario.

Closes gh-8147
8 years ago
Stephane Nicoll 5c663a9ece Merge branch '1.5.x' 8 years ago
Johnny Lim 846994e498 Polish
Closes gh-8148
8 years ago
Brian Clozel 7f39d5a865 Remove usage of Assert.notNull(Object)
This commit updates the Spring Boot codebase to adapt to the removal of
`Assert.notNull(Object)` in SPR-15196.

See gh-8140
8 years ago
Andy Wilkinson 95f659f4f9 Add new WebApplicationType enum to pave the way for Web Flux support
Closes gh-8077
8 years ago
Spring Buildmaster 5c12500366 Next Development Version 8 years ago
Artem Bilan eccefd1343 Make use of new extensions point in IntegrationComponentScanRegistrar
SI 5 has made IntegrationComponentScanRegistrar more extensible by
offering a method for getting the back packages that can be
overridden.

This commit takes advantage of that change by removing our creation
of "fake" annotation metadata and overriding getBackPackages to return
the auto-configuration packages instead.

Closes gh-7744
8 years ago
Spring Buildmaster a2696bf873 Next Development Version 8 years ago
Andy Wilkinson 4ea7dc6f31 Polish "Upgrade to Flyway 4.0"
See gh-5344
8 years ago
Eddú Meléndez a270c13d6f Upgrade to Flyway 4.0
Closes gh-5344
8 years ago
Phillip Webb 8747e039ee Merge branch '1.5.x' 8 years ago
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
8 years ago
Andy Wilkinson 31b0e81765 Add @FunctionalInterface to remaining public and protected interfaces
See gh-6857
8 years ago
Eddú Meléndez 3d52c86a21 Annotate interfaces with @FunctionaInterface
Closes gh-6857
8 years ago
Andy Wilkinson bed727ae8c Merge branch '1.5.x' 8 years ago
Andy Wilkinson f34d309548 Formatting 8 years ago
Spring Buildmaster ed1ce140c0 Next Development Version 8 years ago
Andy Wilkinson 5d24c9c589 Merge branch '1.5.x' 8 years ago
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
8 years ago
Andy Wilkinson 4993f32da8 Merge branch '1.5.x' 8 years ago
Brian Clozel de98c4b3ff Provide Reactor 3 auto-configuration
This commit provides auto-configuration for the Reactor Core 3 library.
A new configuration namespace, "spring.reactor" allows to configure
hooks on operators, like "spring.reactor.stacktrace-mode.enabled".

This property is enabled automatically by devtools, since it improves
the developer experience and provides full stacktrace information when
exceptions occur (but at a performance cost).

Fixes gh-7302
8 years ago
Andy Wilkinson f823599d1f Replace @PostConstruct validation with setter validation
Closes gh-7579
8 years ago
Andy Wilkinson 05831e4b87 Merge branch '1.5.x' 8 years ago
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
8 years ago
Andy Wilkinson 9bba73a1a9 Upgrade to Thymeleaf 3 and drop support for Thymleaf 2
This commit raises the minimum supported version of Thymeleaf to
3.0.x. It also upgrades Spring Social to a version that is compatible
with Thymeleaf 3.

Closes gh-7450
Closes gh-6258
See gh-7885
8 years ago
Stephane Nicoll 661fd848eb Merge branch '1.5.x' 8 years ago
Stephane Nicoll 505e7f75ea Polish contribution
Closes gh-8089
8 years ago
dreis d58f38f6f6 Use String.replace() with single char if possible
See gh-8089
8 years ago
Stephane Nicoll 551bfb2c60 Polish contribution
Closes gh-8103
8 years ago
Johnny Lim 32f9e90de5 Replace 'String.length() == 0' with 'String.isEmpty()'
See gh-8103
8 years ago
Stephane Nicoll d67ce78e8b Merge branch '1.5.x' 8 years ago
Johnny Lim e0de28a1f7 Polish
Closes gh-8076
8 years ago
Andy Wilkinson 0148276c05 Remove unnecessary warning suppressions 8 years ago
Phillip Webb 8ffaa54e74 Merge branch '1.5.x' 8 years ago
Phillip Webb b0e06c30a0 Polish 8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago