Commit Graph

2292 Commits (73b7b3d7be23e7b0bfa04c74afcdc3b0ce42638e)

Author SHA1 Message Date
Phillip Webb fce17ca6d9 Polish 8 years ago
Andy Wilkinson 1cd781b242 Make spring-boot-test compatible with Mockito 2.1 and 2.2
We use some internal Mockito classes and some  breaking API changes
have been made to them in Mockito 2. This commit introduces a utility
class, SpringBootMockUtil, to shield our code from these differences.
Mockito 1 is called directly and Mockito 2 is called via reflection.

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

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

Closes gh-7367
8 years ago
Phillip Webb 238c22cd73 Polish content security policy contribution
See gh-7373
See gh-7373
8 years ago
Christoffer Sawicki d7bbea63b7 Add properties for content security policy
Add `content-security-policy` and `content-security-policy-mode`
`security.header` properties and update auto-configuration to apply
them when specified.

Fixes gh-7373
Closes gh-7357
8 years ago
Johnny Lim 8038882d46 Polish
Closes gh-7403
8 years ago
Andy Wilkinson 387a406aad Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson b3e0a37197 Remove unwanted System.out calls in test code 8 years ago
Spring Buildmaster e712a9ba8c Next Development Version 8 years ago
Stephane Nicoll b51f92d9a4 Merge branch '1.4.x' into 1.5.x 8 years ago
Vedran Pavic 5783cd5593 Fix JWT token URI derivation
Closes gh-7299
8 years ago
Phillip Webb 81c5753f4d Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb 90afc8ebbe Formatting 8 years ago
Madhura Bhave 73308ba24b Merge remote-tracking branch 'springsource/1.4.x' into 1.5.x 8 years ago
Madhura Bhave b04a74f01d Fix failure analysis for Collections and Maps
Closes gh-6996
8 years ago
Phillip Webb 5b66ffbb4b Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb f4328b41af Polish 8 years ago
Phillip Webb 1b17677e0b Polish TLD skip pattern support
See gh-5010
8 years ago
Phillip Webb dbf6d3d418 Don't detect persistenceUnitRootLocation
Update JpaBaseConfiguration so that the persistenceUnitRootLocation is
no longer detected. The update to gh-7003 means that we can now rely on
the standard detection mechanism.

Fixes gh-6983
See gh-6635
8 years ago
Stephane Nicoll 9100897dcb Automatically exclude auto-configurations from component scan
Previously, if an auto-configuration class was (wrongly) located in a
candidate package for component scanning, the class was silently loaded
as an app configuration (i.e. with the wrong lifecycle).

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

Closes gh-7168
8 years ago
Stephane Nicoll 4f06e52d7e Allow adding additional tld skip patterns
This commit improves `TomcatEmbeddedServletContainerFactory` so that tld
skip patterns can be set or added to an existing set. An additional
`server.tomcat.additional-tld-skip-patterns` is now being exposed to
easily add patterns via configuration.

Closes gh-5010
8 years ago
Stephane Nicoll 94da9ad6e6 Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll 1a6ab90255 Polish test 8 years ago
Stephane Nicoll ed7de8eb60 Polish contribution
Also add rotate attribute to Undertow

Closes gh-7225
8 years ago
Matthieu Mouminoux 1d95219c4b Allow to configure Tomcat's rotatable property
See gh-7225
8 years ago
Stephane Nicoll ae4dd0d17e Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll a638dcd51b Remove unnecessary use of System.out.println 8 years ago
Andy Wilkinson a416f496c0 Clean up deprecation and unused code warnings 8 years ago
Andy Wilkinson 29d4a01b30 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 7968c6b548 Assign on order to OnPropertyCondition
Closes gh-7144
8 years ago
Andy Wilkinson cc04621dc2 Assign an order to OnResourceCondition
Closes gh-7145
8 years ago
Madhura Bhave 90722a9bca Add @ConditionalOnCloudPlatform
Add a @ConditionalOnCloudPlatform annotation that matches based on the
active ClouldPlatform.

Fixes gh-7155
8 years ago
Phillip Webb d818a09ed8 Polish 8 years ago
Phillip Webb d3e06c4627 Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb db3f488d5a Polish 8 years ago
Stephane Nicoll 6fb53f90e5 Polish contribution
Closes gh-6666
8 years ago
Maciej Walkowiak 47ec8630c8 Add Rabbit idleEventInterval property
This commit adds a property to configure how often idle container events
should be published.

See gh-6666
8 years ago
Andy Wilkinson f0b235cbc5 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 0333416952 Update WelcomePageHandlerMapping to handle reqs with no Accept header
Closes gh-7138
8 years ago
Stephane Nicoll ab2a2579c8 Polish contribution
Closes gh-6571
8 years ago
Aurélien Leboulanger 7efdb91641 Manage Tomcat queued connections
Adding two tomcat server properties:
- server.tomcat.accept-count
- server.tomcat.max-connections

Closes gh-6433
8 years ago
Stephane Nicoll 3e1425ebed Polish contribution
Closes gh-6543
8 years ago
Vedran Pavic 286a928347 Improve database initializers
This commit improves database initializers for Spring Batch and Spring
Session by introducing `AbstractDatabaseInitializer` which eliminates
duplicated logic in existing initializers. Additionally, database
platform resolution now relies on `DatabaseDriver`.

See gh-6543
8 years ago
Stephane Nicoll ed333a67b4 Expose Spring Data Rest RepositoryDetectionStrategy
Closes gh-7113
8 years ago
Stephane Nicoll 02b0e3955c Merge branch '1.4.x' into 1.5.x 8 years ago
Johnny Lim 1c4c0c6119 Fix String.format() usages
Closes gh-7120
8 years ago
Andy Wilkinson 9b8f33df6d Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 20a2db79bd Separate conditions that did and did not match in auto-config report
Closes gh-7098
8 years ago
Stephane Nicoll f82e91df39 Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll 03961e6692 Polish contribution
Closes gh-7004
8 years ago
Rob Fletcher 7fcb197092 Allow configuration to specify randomly generated database name
See gh-7004
8 years ago
Stephane Nicoll 200e246238 Merge branch '1.4.x' into 1.5.x 8 years ago
Johnny Lim 91254f2110 Remove unused parameters in String.format()
Closes gh-7111
8 years ago
Stephane Nicoll cf28663cd7 Deprecate commons-dbcp 1
Closes gh-6787
8 years ago
Stephane Nicoll 07690bab25 Allow customization of the auto-configured JmsTemplate
Closes gh-6825
8 years ago
Phillip Webb a2315378d4 Formatting 8 years ago
Phillip Webb f2b0fa284e Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb 3326841a97 Formatting 8 years ago
Phillip Webb 39ed0d4dfb Polish 8 years ago
Stephane Nicoll 8ad477537e Fail fast if both uri and client attributes are set
Previously, an URI and individual client attributes can be set to
configure the mongo client. In such a scenario, the URI is ignored.

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

Closes gh-6739
8 years ago
Stephane Nicoll e643fc5bd1 Merge branch '1.4.x' into 1.5.x 8 years ago
Johnny Lim 503d735fdd Polish
Closes gh-7081
8 years ago
Stephane Nicoll 7ffa499949 Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll e56119165e Close JestClient on shutdown
Closes gh-7051
8 years ago
Stephane Nicoll 8ed20068ca Fix list property to be mutable
Closes gh-7045
8 years ago
Andy Wilkinson 2a035d0748 Remove support for Velocity following its deprecation in 1.4
Closes gh-6971
8 years ago
Andy Wilkinson 464915d2cc Remove support for HornetQ following its deprecation in 1.4
See gh-6971
8 years ago
Andy Wilkinson 0232e3b16c Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson d08c84af42 Ensure that JtaAutoConfiguration runs before ArtemisAutoConfiguration
Closes gh-7062
8 years ago
Andy Wilkinson b4d052a7b3 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 33ea73996e Make auto-config for Narayana back off when Transaction SPI not on classpath
Closes gh-7061
8 years ago
Vedran Pavic c4aa78679a Upgrade Hazelcast to 3.7.1
In addition, dependency management for `hazelcast-hibernate5` module has
been added, and a separate dependency version was introduced for
`hazelcast-hibernate4` module.

Closes gh-7023
8 years ago
Stephane Nicoll cdd59707fc Merge branch '1.4.x' into 1.5.x 8 years ago
Johnny Lim 30a677646f Polish
Closes gh-7030
8 years ago
Vedran Pavic f485660482 Upgrade Spring Session to 1.3.0.M2
Closes gh-6979
8 years ago
Stephane Nicoll 7dfa3a8c83 Harmonize Caffeine CacheManager bean name
Closes gh-6980
8 years ago
Andy Wilkinson aaf435ff2a Suppress Neo4J-related deprecation warnings
See gh-6976
8 years ago
Andy Wilkinson c108da9d53 Upgrade to Spring Data Ingalls M1
Closes gh-6785
Closes gh-5835
8 years ago
Stephane Nicoll bd7c20eb1c Deprecate Guava support 8 years ago
Stephane Nicoll ce1e41dce3 Remove deprecated code
This code removes code deprecated in 1.4 with the exception of code that
requires an update to Spring Framework 5.

Closes gh-6971
8 years ago
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 8 years ago
Spring Buildmaster 7e9ed5e1a7 Next Development Version 8 years ago
Phillip Webb 51092af739 Polish 8 years ago
Eddú Meléndez bc55b6e0d4 Add contextPath LocalHostUriTemplateHandler URIs
Update `LocalHostUriTemplateHandler` so that the `server.context-path`
property is also considered when building the URL.

Fixes gh-6904
Closes gh-6919
8 years ago
Phillip Webb 0eab3e0c5a Drop printed link to reference documentation
Tweak the fix from 50c68a49 to no longer print a link the reference
documentation.

See gh-6593
8 years ago
Phillip Webb 825dd0a26c Merge branch '1.3.x' 8 years ago
Phillip Webb b97e0bd471 Allow HttpPutFormContentFilter to be disabled
Add `spring.mvc.formcontent.putfilter.enabled` property to allow the
HttpPutFormContentFilter to be disabled.

Fixes gh-6519
8 years ago
Phillip Webb a2e4127d4f Fix multi-annotation nested condition logic
Update `AbstractNestedCondition` to correctly group nested conditions
on members.

Fixes gh-6672
8 years ago
Stephane Nicoll 50c68a497b Improve startup error message
This commit improves the startup error message so that it does not
reference  `--debug` anymore. Such command-line switch only works when
the application is started using `java -jar`.

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

Closes gh-6593
8 years ago
Stephane Nicoll 78bb04f2c1 Polish 8 years ago
Stephane Nicoll 284988f0cd Clarify SpringBootWebSecurityConfiguration scope
This commit fixes the documentation that wrongly states that
SpringBootWebSecurityConfiguration is an auto-configuration. Rather than
excluding this class, we should exclude SecurityAutoConfiguration that
imports it.

Closes gh-6861
8 years ago
Oliver Gierke 0860ad4fd4 Use default simple types with MongoMappingContext
Change the auto-configure MongoMappingContext to use the
SimpleTypesHolder instance `Set` that's produced by a CustomConversions
bean, which we in turn now default, too.

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

Fixes gh-6881
Closes gh-6882
8 years ago
Phillip Webb dcfe2673fd Fix failing test following Tomcat upgrade
Tomcat 8.5.5 has change the default value of `validationInterval` to
3000. See https://bz.apache.org/bugzilla/show_bug.cgi?id=59923 for
details.

See gh-6703
See gh-6657
8 years ago
Johnny Lim caa4c0800f Polish
Closes gh-6872
8 years ago
Phillip Webb c56f30fd91 Formatting 8 years ago
Stephane Nicoll ee668e6782 Polish contribution
Closes gh-6651
8 years ago
Vedran Pavic 06a1f44128 Validate Spring Batch database initializer configuration
This commit adds Spring Batch configuration validation that disables
database initializer in case custom table prefix is configured with
default schema.

See gh-6651
8 years ago
Stephane Nicoll def40bf27f Polish 8 years ago
Stephane Nicoll a347a780e7 Polish contribution
Closes gh-6649
8 years ago
Vedran Pavic 9141177f1a Validate Spring Session database initializer configuration
This commit adds Spring Session JDBC configuration validation that
disables database initializer in case custom table name is configured
with default schema.

See gh-6649
8 years ago
Phillip Webb 56544c8dd5 Polish 8 years ago
Brian Clozel 274734e787 Add `spring.thymeleaf.check-template` property
This commit adds a new `spring.thymeleaf.check-template` property which
is only used for Thymeleaf 3.0+.

Since thymeleaf/thymeleaf#419, the Thymeleaf template resolver
implementations can implement the `setCheckExistence` method - this
enables the template existence verification at **resolution** time,
which means the resolver can return null as a `TemplateResolution`
and let other template resolvers in the chain try.

This new property is set to `true` by default and can be disabled if the
application only has a single resolver and the template existence check
is considered as a performance penalty with the configured resolver.

Fixes gh-6500
8 years ago
making 8a5c026a9d Add spring.http.multipart.resolve-lazily
This commit adds the `spring.http.multipart.resolve-lazily`
property, in order to configure whether the multipart request
should be resolved lazily, as the parameters are accessed.
8 years ago
Stephane Nicoll b450fece2e Add NoSuchBeanDefinitionException failure analyzer
Add a `FailureAnalyzer` that handles the case where the context does
not start because no candidate bean was found for an `InjectionPoint`.

The implementation inspects the auto-configuration report for beans
that are candidate and output the condition(s) that lead to such beans
to be discarded on startup. If a whole auto-configuration class is
disabled (or excluded), its beans are inspected and candidates are
extracted in a similar way.

This works for both injection by type and by name.

Closes gh-6612
8 years ago
Phillip Webb 7396ccfe04 Harmonize ConditionOutcome messages
Add ConditionMessage class to help build condition messages in a
uniform format and update existing conditions to use it.

Fixes gh-6756
8 years ago
Johnny Lim 4b9f6869f0 Polish
Closes gh-6817
8 years ago
Andy Wilkinson 2e1988f97e Rework welcome page so that it only handles reqs that accept text/html
Closes gh-6668
8 years ago
Andy Wilkinson 3814e509a3 Polish @deprecated javadoc and link to replacements where available
Closes gh-6765
8 years ago
Andy Wilkinson d720645275 Polishing
Fix mistake introduced during forward merge
8 years ago
Phillip Webb 2a22a7af12 Remove ApplicationInfo
Rework commit 4a69755b to remove the need for the ApplicationInfo class.
The updated code now uses the auto-configuration class to compute a
default persistence unit root location

Closes gh-6635
8 years ago
Andy Wilkinson b488a3d9a3 Merge branch '1.3.x' 8 years ago
Andy Wilkinson 63b8e82c10 Update OnBeanCondition to consider hierarchy for PARENTS search strategy
Closes gh-6762
8 years ago
Phillip Webb 565ad79856 Polish 8 years ago
Phillip Webb 850141c405 Merge branch '1.3.x' 8 years ago
Phillip Webb 69e96c6211 Polish 8 years ago
Andy Wilkinson 55f6fb94ef Merge branch '1.3.x' 8 years ago
Andy Wilkinson a5c6b0954d Consider ancestors when finding primary beans for ConditionalOnSingleCandidate
Closes gh-6559
8 years ago
Andy Wilkinson 6df279d3a1 Merge branch '1.3.x' 8 years ago
Andy Wilkinson 75c1e50c5a Improve type determination for factory beans during condition evaluation
Previously, BeanTypeRegistry did not correctly determine the type
that would be created by a factory bean if that factory bean was
returned from a bean method with arguments on a configuration class
found via component scanning.

The key difference is that bean definitions for bean methods on
configuration classes found via component scanning use ASM-based
metadata rather than reflection-based metadata. The ASM-based method
data does not provide direct access to the Method that will create the
bean. In this case, BeanTypeRegistry was falling back to looking for
a method with the matching name and no arguments. Therefore, if
the bean method had any arguments it would fail to find the method
and would, therefore, be unable to determine the type of bean
produced by the factory bean.

This commit updates BeanTypeRegistry to use logic that is very similar
to Spring Framework's ConstructorResolver's
resolveFactoryMethodIfPossible method to locate the method that will
produce the factory bean. It looks for a single method with
the required name with any number of arguments. If it finds multiple
methods with the required name and different arguments it returns
null, just as ConstructorResolver does.

Closes gh-6755
8 years ago
Stephane Nicoll 47c568a24d Polish contribution
Closes gh-6746
8 years ago
Caleb Cushing bb7b789cd9 Detect Neo4j bolt driver
Closes gh-6690
8 years ago
Stephane Nicoll b9104c9337 Restore support for empty persistence unit with fat jars
Due to the layout format change in 1.4, Spring Framework is no longer
able to compute a default persistence unit root URL. If a Spring Boot 1.4
application has JPA but does not have any entity, the application started
from a fat jar now fails with a quite cryptic exception.

This commit introduces `ApplicationInfo` as a general replacement for
the `ApplicationArguments` and `Banner` singleton beans that
`SpringApplication` registers on startup. `ApplicationInfo` also defines
the detected "main" `Class` that can be used to compute a last resort
URL that makes sense.

If such bean is available, `EntityManagerFactoryBuilder` now sets the
default persistence unit root location, preventing Spring Framework to
attempt to resolve an unknown location. Note that in our case the
persistence unit root location is actually useless: given the way the
persistence unit is created, nothing actually uses it but Hibernate, as a
compliant JPA provider, has to make sure this setting is set to a valid
URL nevertheless.

Closes gh-6635
8 years ago
Stephane Nicoll 86757efcdf Add FailureAnalyzer for Hikari
Hikari can configure both an underlying Driver or DataSource. Spring Boot
only supports the former so any attempt to trigger the creation of the
latter will lead to an exception since the auto-configuration has set
driver-specific field.

This commit adds an analyzer that intercepts such faulty scenario and
indicate that users should configure Hikari with an underlying DataSource
themselves.

Closes gh-6568
8 years ago
Johnny Lim 524edaea51 Polish
Closes gh-6728
8 years ago
Stephane Nicoll 6c1b46e162 Mark auto-configured `JdbcTemplate` as primary
This commit marks the auto-configured `JdbcTemplate` as `Primary`. Spring
session creates its own so we could end up with two in a fully auto
configured context.

Closes gh-6717
8 years ago
Andy Wilkinson e465368f54 Ensure that access log is flushed periodically
Previously, Tomcat’s background processing was only enabled on the
context but access logging was configured on the engine. This means that
the access log valve’s background processing method was never called
and, therefore, that it wasn’t flushed periodically.

This commit moves the enablement of background processing up to the
engine, thereby ensuring that the access log is flushed periodically.
Background processing cascades down the container hierarchy so, after
this change, background processing will still be performed on the
context as well.

Closes gh-6646
8 years ago
Andy Wilkinson 1dc231f771 Use Hamcrest's containsString matcher rather than Mockito's 8 years ago
Andy Wilkinson d4c9a2b271 Merge branch '1.3.x' 8 years ago
Andy Wilkinson ba51dc5c4a Make configuration of Liquibase’s logging more robust
We make Liquibase aware of our custom Commons Logging-based logger by
adding its package to the Liquibase ServiceLocator’s packages to scan.
Previously, this was happening too late so Liquibase may have already
initialized and cached a particular logger.

This commit moves the registration of the extra package from the
Liquibase auto-configuration to the application listener that customises
Liquibase’s ServiceLocator. This ensures that the package is added
before Liquibase is used. Unfortunately, configuring Liquibase’s
ServiceLocator and its packages to scan causes it to try to perform
some logging, resulting in it caching the wrong type of logger. We
work around this problem by resetting Liquibase’s LogFactory once we’ve
finished setting everything up.

Closes gh-6713
8 years ago
Stephane Nicoll c9a3880f27 Remove hard-coded property values
As of Spring Boot 1.4, IDEs are supposed to provide auto-completion for
hints and enum values. This commit removes the hard-coded copy of
allowed values for enum-based properties. This was mostly the case
already and this commit fixes the few ones remaining.

Closes gh-6654
8 years ago
Stephane Nicoll 54a3ce8827 Restore support for spring.datasource.type
This commit restores the support of "spring.datasource.type". If this
property is set to an unsupported `DataSource` implementation, we now
properly create it again, rather than ignoring it because its value did
not match any value we support.

Since Spring Boot 1.4 now redirects `DataSource` implementation settings
to dedicated namespaces, the documentation has been updated to explicitly
mention how one can create such arrangement for an unsupported
implementation.

As a convenience, `DataSourceProperties` can initialize a
`DataSourceBuilder` based on its internal state, making it very easy for
anyone to create a `DataSource` from a `DataSourceProperties` instance.

Closes gh-6695
8 years ago
Stephane Nicoll a6ef3741ef Configure Undertow's access log prefix and suffix
This commit adds two properties that can be used to customize the prefix
and suffix of the Undertow's access log.

Closes gh-6652
8 years ago
Johnny Lim 37c8c3669b Polish
Closes gh-6671
8 years ago
Stephane Nicoll 919d6b4b2e Avoid extending from RepositoryRestMvcConfiguration
This commit moves Spring Boot's customizations for Spring Data Rest to
the existing SpringBootRepositoryRestConfigurer.

Closes gh-6581
8 years ago
Stephane Nicoll 79b0d14504 Fix wrong use of slf4j
Closes gh-6650
8 years ago
Andy Wilkinson c542d87c61 Verify that @FlywayDataSource is preferred over any "normal" DataSource 8 years ago
Andy Wilkinson 7c54c3ff21 Ensure that @LiquibaseDataSource is preferred to “normal” DataSource
Closes gh-6604
8 years ago
Eddú Meléndez 8424965a10 Allow a DataSource to be marked as being specifically for Liquibase
This commit allows to configure a special DataSource to be used by
Liquibase by annotating it with @LiquibaseDataSource.

Closes gh-6614
8 years ago
Andy Wilkinson ec9549f01f Downgrade to Jackson 2.7.6 and verify Elasticsearch’s compatibility
Closes gh-6508
8 years ago
Stephane Nicoll 80a1897ccb Remove useless postgresql alias
See gh-6534
8 years ago
Stephane Nicoll 90c67daec1 Polish contribution
Closes gh-6534
8 years ago
Vedran Pavic b5e2bff1a4 Fix aliases for database names in `JdbcSessionDatabaseInitializer`
See gh-6354
8 years ago
Stephane Nicoll 3f14bdc01d Add missing type condition on JdbcTemplateAutoConfiguration
Closes gh-6499
8 years ago
Spring Buildmaster 334baaeffd Next development version 8 years ago
Spring Buildmaster a89ef5df6e Next Development Version 8 years ago
Johnny Lim 9627d0ed66 Polish
Closes gh-6487
8 years ago
Phillip Webb 162b9e84a3 Polish 8 years ago
Brian Clozel a282710fc9 Add Locale to Charset Mapping for Servlet containers
This commit adds a new configuration key:

    spring.http.encoding.mapping.<locale>=<charset>

This allows to specify which default charset should be used for any
given Locale, if none has been provided already in the response itself.
This applies to all supported embedded servlet containers.

Fixes gh-6453
8 years ago
Kazuki Shimizu 5ecb68b226 Add JdbcTemplate only on single DataSource
Update auto-configuration logic so that a `JdbcTemplate`
is only added when there is a single candidate DataSource bean.

Closes gh-6449
8 years ago
Kazuki Shimizu e0adacbeae Add TransactionManager only on single DataSource
Update auto-configuration logic so that a `DataSourceTransactionManager`
is only added when there is a single candidate DataSource bean.

See gh-6449
8 years ago
Andy Wilkinson fbf291ee12 Make RabbitProperties’ parsed address behaviour the same for all properties
Prior to this commit parsing addresses had an inconsistent effect on the
various properties that can be contained in an address (host, port,
username, password, and virtual host).

Three different approaches were used:

1. Return the property if no addresses were set. If there was one
   address set, return the property from the address. Otherwise return
   null. (host)
2. Return the property if no address were set, otherwise return the
   property from the first address (port)
3. Return the property if no addresses were set, otherwise return the
   property from the last address that had such property (username,
   password, virtual host).

This commit aims to make the behaviour consistent. If no addresses
were set the property is returned. Otherwise the value extracted from
the first address is returned. If the first address has no such value
the property is returned.

Closes gh-6424
8 years ago
Phillip Webb 1080b990e8 Revert "Restore DataSourceProperties get...() methods"
This reverts commit 037e697406.

See gh-6406
8 years ago
Stephane Nicoll b86241cae0 Upgrade to Ehcache 3.1.1
Closes gh-6418
8 years ago
Christoffer Sawicki 3a8cf7ac8a Register valves at the engine level
Update `ServerProperties` to register `AccessLogValve` and
`RemoteIpValve` at the engine level.

Closes gh-6311
8 years ago
Phillip Webb e03e109874 Polish 8 years ago
Phillip Webb 037e697406 Restore DataSourceProperties get...() methods
Restore original get method functionality in DataSourceProperties in
a deprecated form.

Fixes gh-6406
8 years ago
Phillip Webb c889c09066 Refactor from deprecated getAliasedStringArray
Update EntityScanPackages to make use of Spring Framework's updated
alias support with ASM reading.

Closes gh-6337
8 years ago
Phillip Webb 68b9792ed6 Fix FixedAuthoritiesExtractor map extract bug
Fix issue where FixedAuthoritiesExtractor would fail to obtain standard
item from the map because an incorrect key was used.

Fixes gh-6396
8 years ago
Andy Wilkinson b8ad9537a6 Merge branch '1.3.x 8 years ago
Andy Wilkinson 68fb5789ca Create one SpringApplicationAdminMXBeanRegistrar per context hierarchy
Previously, one SpringApplicationAdminMXBeanRegistrar was created
per context. When there was more then one context this would result
in a javax.management.InstanceAlreadyExistsException being thrown
as an attempt was made to register the MBean more than once.

This commit updates SpringApplicationAdminJmxAutoConfiguration so
that the registrar is only created when there's no such existing bean
in the context hierarchy.

Closes gh-6378
8 years ago
Stephane Nicoll 6bd7a2fedd Deprecate HornetQ support
Closes gh-6377
8 years ago
Andy Wilkinson db83e89922 Add support for Thymeleaf 3 while keeping Thymeleaf 2 as the default
Closes gh-4393
8 years ago
Johnny Lim a9f6ae4422 Polish
Closes gh-6374
8 years ago
Stephane Nicoll 17b71df2dd Merge branch '1.3.x' 8 years ago
Stephane Nicoll bbb29dd70f Remove `@Primary` from `IntegrationMBeanExporter`
Commit 3ea84f9e1 has wrongly introduced a `@Primary` marker on
`IntegrationMBeanExporter` so any use of both Spring's JMX support
and Spring Integration's JMX support leads to an exception. This commit
makes sure to remove the unnecessary `@Primary`

Closes gh-6328
8 years ago
Stephane Nicoll 0356be7b95 Refine AliasFor usage
This commit makes sure to use `getAliasedStringArray` rather than
`getStringArray` as the latter does not work with ASM. While this will
probably be fixed in the core framework, this commit also adds dedicated
tests with ASM to ensure that the code works as expected.

Closes gh-6337
8 years ago
Phillip Webb f4df9d9767 Use lexical ordered DataSourceInitializer patterns
Align DataSourceInitializer to Spring Framework by lexically sorting
resolved resource patterns.

Fixes gh-6316
8 years ago
Stephane Nicoll 05dad45172 Add proxy configuration for Jest client
Closes gh-6332
8 years ago
Spring Buildmaster 2216369348 Next Development Version 8 years ago
Andy Wilkinson 8cbe30ab5e Ensure that Jersey and Jackson honour JAXB annotations
By default Jersey configures Jackson to use both Jackson annotations
and JAXB annotations when introspective types for (de)serialization.
However, the changes made in 5776d6a8 mean that Jersey no longer uses
its default ObjectMapper configuration and uses the auto-configured
ObjectMapper instead. This had the unwanted side-effect of leaving
Jersey with an ObjectMapper that only uses Jackson annotations and
ignores JAXB annotations.

This commit updates JerseyAutoConfiguration so that it will add the
JaxbAnnotationIntrospector to the auto-configured ObjectMapper for
both serialization and deserialization. It uses
AnnotationIntrospectorPair to ensure retain any existing
introspectors.

Closes gh-6310
8 years ago
Andy Wilkinson 4697432edd Upgrade to Artemis 1.3.0
Closes gh-6282
9 years ago
Phillip Webb ebdacfabc3 Polish 9 years ago
Stephane Nicoll 2fea5a869d Polish "Add Spring Session JDBC database initializer"
Closes gh-5879
9 years ago
Vedran Pavic a251ea8bc7 Add Spring Session JDBC database initializer
See gh-5879
9 years ago
Andy Wilkinson 2b970f9efc Allow Tomcat context root redirect to be configured via the environment
This commit adds a new property, server.tomcat.redirect-context-root,
that can be used to configure the Tomcat Context’s 
mapperContextRootRedirectEnabled property. The default is to not apply
any configuration and, therefore, to use Tomcat’s default of true.

Closes gh-6248
9 years ago
Phillip Webb d08480320b Stop RequestContextFilter initializing config
Change WebMvcAutoConfigurationAdapter.requestContextFilter() to a static
method so that the configuration class isn't needed when creating it.
This helps to prevent early initialization of beans.

See gh-6178
9 years ago
Phillip Webb 266445aaf0 Polish 9 years ago
Dave Syer d41127d3da Add javadocs to auth server config props 9 years ago
Andy Wilkinson 05b44a98e0 Simplify generics in CassandraRepositoriesAutoConfigurationTests 9 years ago
Johnny Lim 5bc9d5b380 Polish
Closes gh-6244
9 years ago
Stephane Nicoll fc4d8b99d6 Allow to configure Tomcat's renameOnRotate property
Closes gh-5981
9 years ago
Stephane Nicoll c024dc836a Support Spring Mobile for all template engines
Previously, Spring Mobile was only supported for Thymeleaf and JSPs. This
commit improves the auto-configuration to also provide device delegating
support for Freemarker, Groovy Templates and Mustache.

Closes gh-5140
9 years ago
Stephane Nicoll 397c64d256 Polish "Add schemaAction property"
Closes gh-5855
9 years ago
Mark Paluch e85cb2c4c5 Add schemaAction property to CassandraProperties
Set schemaAction property in CassandraSessionFactoryBean. Use relaxed
property resolver for enum lookup of the configured schemaAction.

See gh-5855
9 years ago
Andy Wilkinson 94ba6bdae2 Polish “Allow connection timeout to be configured via the environment”
- Preserve default connection timeout when server.connection-timeout
   has not been set
 - Apply standard coding conventions and formatting

See gh-6072
9 years ago
Misagh Moayyed 6007d7efc1 Allow connection timeout to be configured via the environment
Closes gh-6072
9 years ago
Stephane Nicoll 0de5988c0e Use Mongo 3.0 specific API
See gh-6176
9 years ago
Stephane Nicoll 958a0a45f1 Merge branch '1.3.x' 9 years ago
Stephane Nicoll 4e07003e1d Polish "Use missing MongoClientOptions in MongoProperties"
Closes gh-6176
9 years ago
Nasko Vasilev 59f9cfb8a6 Use missing MongoClientOptions in MongoProperties
See gh-6176
9 years ago
Stephane Nicoll 33b1f52fa5 Merge branch '1.3.x' 9 years ago
Stephane Nicoll 7a5fabf59d Polish "Add condition on MongoClientFactoryBean"
Closes gh-6203
9 years ago
Julien May 2003c5e1ae Add condition on MongoClientFactoryBean
This commit makes sure that the condition that links a `MongoClient` to
the embedded mongo server kicks in only if `MongoClientFactoryBean` is
also on the classpath.

Previously, only a condition on the mongo driver existed, leading to
`ClassNotFoundException` if Spring Data MongoDB wasn't available.

See gh-6203
9 years ago
Stephane Nicoll 5656e83ba9 Enable logging of resolved exceptions
Previously, if an exception was resolved by a `HandlerExceptionResolver`
nothing the log indicated a failure to process the query.

This commit adds a new property `spring.mvc.log-resolved-exception` that
enables warning logs for supported `HandlerExceptionResolver` instances.

When Devtools is enabled, this flag is enabled by default.

Closes gh-2176
9 years ago
Johnny Lim 301574de09 Polish
Closes gh-6234
9 years ago
Phillip Webb 654801083b Provide unified @EntityScan annotation
Add a new `@EntiyScan` annotation that's used by auto-configuration to:
* Set JPA packagesToScan.
* Set Neo4J's SessionFactory packages.
* Set the initial entity set for Spring Data MongoDB, Cassandra and
  Couchbase mapping contexts.

Additionally deprecate `@org.springframework.boot.orm.jpa.EntityScan`.

See gh-6142
9 years ago
Phillip Webb 15670b8e28 Relocate Neo4J auto-configuration
Move Neo4J auto-configuration from `autoconfigure.neo4j` to
`autoconfigure.data.neo4j` since it's intrinsically linked to Spring
Data.

See gh-5458
See gh-6142
9 years ago
Phillip Webb c22a0e90a2 Polish 9 years ago
Stephane Nicoll 2dc6e5b6fa Refactor Jest auto-configuration package space
This commit moves the Jest auto-configuration from `spring.jest` to
`spring.elasticsearch.jest`

Closes gh-6032
9 years ago
Phillip Webb 5182bc4f2b Improve startup times
Improve startup times (although not by much) by adding more background
pre-initializers and lazily evaluating the whitelabel SpEL view.

See gh-6177
9 years ago
Johnny Lim e0389cb9d8 Remove unnecessary constructor
Closes gh-6202
9 years ago
Andy Wilkinson 52e8ad4b6b Drop back to Hibernate 5.0.9.Final
The upgrade to Hibernate 5.2.0.Final has provide to be too
problematic to live with. It requires Java 8, is incompatible with
a number of other projects in the Hibernate ecosystem, and it's
unclear for how long it will be maintained. We'd previously used
Hibernate 5.1.0.Final but its maintenance is also unclear with
Hibernate 5.1.1.Final being more than 3 months overdue.

This commit drops back to Hibernate 5.0.9.Final. This has a few
advantages:

- It's Java 7 compatible
- It's had some time to mature and should be reasonably free of
  regressions for those moving from 4.3.x
- It's used in both Wildfly and JBoss EAP so there's a fair chance
  that it will continue to be maintained.

Closes gh-6198
9 years ago
Phillip Webb 7446235ff4 Polish 9 years ago
Phillip Webb c136054e69 Merge branch '1.3.x' 9 years ago
Phillip Webb 5b97981c87 Polish 9 years ago
Andy Wilkinson 2c8eaac78c Update documentation of server.server-header for changes in 3009e51
See gh-4730
9 years ago
Andy Wilkinson 5e4f84cf46 Allow maximum HTTP header size to be configured when using Jetty 8
Closes gh-6190
9 years ago
Stephane Nicoll e383752150 Merge branch '1.3.x' 9 years ago
Artem Bilan 3ea84f9e1d Fix relaxed binding of SI JMX config
Instead of using an expression for JMX-related properties, this commit
properly honors relaxed binding.

Closes gh-6184
9 years ago
Stephane Nicoll 976f0a7a80 Fix build failure
Fixing #5939 lead to a build failure as OAuth2 related configuration was
defined twice. This is also related to #5973.
9 years ago
Stephane Nicoll bce6bd6594 Polish 9 years ago
Stephane Nicoll 7b5df365d8 Enable SSL from MongoClientOptions
Closes gh-5099
9 years ago
Stephane Nicoll 2ff9e3cfdc Upgrade to Hibernate 5.2
See gh-6111
9 years ago
Stephane Nicoll a273d8d0c8 Add secured connection support to Artemis
This commit aligns the feature introduced in gh-6071 to Artemis.

Closes gh-6179
9 years ago
Stephane Nicoll 8b79c667a7 Polish "Secured HornetQ" contribution
Closes gh-6071
9 years ago
Stéphane Lagraulet 1aa8f49001 Add a secured connection factory for Hornetq.
See gh-6071
9 years ago
Stephane Nicoll d54474b81c Allow locale to be overridden by "Accept-Language"
Previously, when `spring.mvc.locale` was specified, that locale was used
regardless of the client's preferences. This commit adds an extra
`spring.mvc.locale-resolver` property that can control how the locale is
resolved. The default is `ACCEPT_HEADER` but can be set to `FIXED` to
restore the previous behaviour.

Closes gh-6083
9 years ago
Dave Syer a3b29b0e42 Add /webjars/** to default list of unsecured resources
Fixes gh-2460
9 years ago
Dave Syer 6b6f4e2263 Fix JSON syntax
(according to Eclipse it was broken)
9 years ago
Stephane Nicoll 7afe1d16a6 Add Jest support
This commit adds auto-configuration support for Jest, an HTTP client for
Elasticsearch. If Jest is present, a `JestClient` targeting a local
elasticsearch instance is auto-configured. Several properties from the
`spring.jest.*` namespace allows to tune the client.

Closes gh-6032
9 years ago
Phillip Webb e27bc9ddea Merge branch '1.3.x' 9 years ago
Phillip Webb ed6f11d60d Polish 9 years ago
Brian Clozel 6dc0ecb182 Add WebMvcRegistrations for custom MVC components
Add `WebMvcRegistrations` which can be used to provide custom
instances of `RequestMappingHandlerMapping`,
`RequestMappingHandlerAdapter` and `ExceptionHandlerExceptionResolver`.
Those instances are then used and processed by the Boot MVC
configuration.

Prior to this commit, developers could provide their custom instances
of MVC infrstructure components such as `RequestMappingHandlerMapping`
and `RequestMappingHandlerAdapter` only by using advanced configuration
strategies. Those advanced configurations involved subclassing
`WebMvcConfigurationSupport` which effectively turns off MVC
auto-configuration in Boot.

Fixes gh-5004
Closes gh-6100
9 years ago
Phillip Webb 99c6194e17 Don't use MockitoJUnitRunner
Replace `@RunWith(MockitoJUnitRunner.class)` with direct Mockito
initialization since the running doesn't support parallel test
execution.
9 years ago
Stephane Nicoll 8ea5524d6a Polish 9 years ago
Stephane Nicoll 72e4064230 Merge branch '1.3.x' 9 years ago
Vedran Pavic 6dde498b87 Update DataSourceBuilder aliases
This commit adds a `user` alias for the `username` property which permits
the use of `OracleDataSource`.

Closes gh-6124, gh-6027, gh-6125
9 years ago
Brian Clozel 091664078f Split up DispatcherServletConfiguration condition
Prior to this commit, defining a custom `DispatcherServlet` and/or a
`ServletRegistrationBean` with the default name would turn off
completely the `DispatcherServletAutoConfiguration`.

This commit splits this auto-configuration in two parts:

- First, a `DispatcherServlet` is automatically registered if no
instance is already defined with the default name.
- Then, a `ServletRegistrationBean` is registered is registered if a
`DispatcherServlet` instance exists with the default name *and* no
`ServletRegistrationBean` exists with the default name

This allows developers to register manually a `ServletRegistrationBean`
or a `DispatcherServlet` without having to redefine the whole
auto-configuration.

Fixes gh-4893
Closes gh-6108
9 years ago
Phillip Webb 0fa4d2e260 Make SocialAutoConfigurerAdapter/Properties public
Fixes gh-6078
9 years ago
Johnny Lim 5de9516255 Fix typos
Closes gh-6114
9 years ago
Phillip Webb b38231021d Provide web client Auto-configuration
Add auto-configuration for use with typical web clients. Currently
client auto-configuration consists of a RestTemplateBuilder
pre-configured with HttpMessageConverters.

Closes gh-5507
9 years ago
Phillip Webb bc6f1cfdf3 Polish 9 years ago
Andy Wilkinson 73b01cff4f Use spring.factories to declare each test slice's auto-config imports
Closes gh-6001
9 years ago
Andy Wilkinson 8c9c649805 Fix MongoPropertiesTests following upgrade to Mongo 3.2 (6f5bd2e)
See gh-3011
9 years ago
Johnny Lim 70adefc87b Polish
Closes gh-6046
9 years ago
Andy Wilkinson 6f5bd2e13a Upgrade to MongoDB 3
This commit upgrades to MongoDB 3. Dependency management has been added
for the new and preferred mongodb-driver artifact. The starter has
been updated to use this new artifact rather than monogo-java-driver.
Dependency management for mongo-java-driver has been retained to avoid
causing problems for people who have declared the dependency explicitly.
The auto-configuration for Embedded Mongo has also been updated to
use 3.2.2 by default.

Closes gh-3011
9 years ago
Phillip Webb ccdcad757a Allow template lookup caching to be disabled
Extract TemplateAvailabilityProvider caching logic to a new
TemplateAvailabilityProviders class and provide property support to
disable it. Also update DevToolsPropertyDefaultsPostProcessor to
automatically set the property.

Fixes gh-5989
9 years ago
Stephane Nicoll c3201a1e91 Revert "Cache resolved error template view names"
See gh-5989
9 years ago
Stephane Nicoll dcf3a56bd5 Polish 9 years ago
Stephane Nicoll 3805fc7455 Polish 9 years ago
Phillip Webb f3e630933a Add OAuth PrincipalExtractor strategy interface
Update `UserInfoTokenServices` to use a PrincipalExtractor interface
to extract the principal.

Fixes gh-5186
9 years ago
Phillip Webb 7f45485e61 Provide explicit force request/response properties
Update HttpEncodingProperties to offer explicit `force-request` and
`force-reponse` properties in additional to the existing `force`
property.

Closes gh-5459
9 years ago
Phillip Webb bcfa2e6676 Make TestRestTemplate not extend RestTemplate
Update TestRestTemplate so that it no longer directly extends
RestTemplate. Prior to this commit it was possible that TestRestTemplate
could interfere with user defined RestTemplate beans.

TestRestTemplate offers the same methods as RestTemplate so should be
a drop-in replacement. If access is needed to the actual underlying
template the `getRestTemplate()` method should be used.

Fixes gh-5915
9 years ago
Phillip Webb 00fbb5c3d9 Polish 9 years ago
Dave Syer 46134b58b8 Fix stupid checkstyle violations 9 years ago
Dave Syer 684c8c81a3 Extract user info rest template into a factory
Instead of using a @Bean, it is better to use an opaque factory
for an internal dependency that users are not going to want in
the context. OAuth2RestTemplate is a common enough bean type that
creating on in autoconfig makes it hard for users to add their own
for business use.

See gh-5967
9 years ago
Phillip Webb c15c146021 Cache resolved error template view names
Fixes gh-5933
9 years ago
Phillip Webb 6cdbdf9ad3 Polish 9 years ago