Commit Graph

2017 Commits

Author SHA1 Message Date
Phillip Webb 3326841a97 Formatting 2016-10-03 22:19:35 -07:00
Phillip Webb 39ed0d4dfb Polish 2016-10-03 21:58:13 -07:00
Johnny Lim 503d735fdd Polish
Closes gh-7081
2016-10-02 11:07:04 +02:00
Stephane Nicoll e56119165e Close JestClient on shutdown
Closes gh-7051
2016-09-30 10:51:48 +02:00
Stephane Nicoll 8ed20068ca Fix list property to be mutable
Closes gh-7045
2016-09-30 10:34:25 +02:00
Andy Wilkinson d08c84af42 Ensure that JtaAutoConfiguration runs before ArtemisAutoConfiguration
Closes gh-7062
2016-09-29 15:08:24 +01:00
Andy Wilkinson 33ea73996e Make auto-config for Narayana back off when Transaction SPI not on classpath
Closes gh-7061
2016-09-29 14:56:05 +01:00
Johnny Lim 30a677646f Polish
Closes gh-7030
2016-09-28 16:45:19 +02:00
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Phillip Webb 51092af739 Polish 2016-09-20 14:32:09 -07:00
Eddú Meléndez bc55b6e0d4 Add contextPath LocalHostUriTemplateHandler URIs
Update `LocalHostUriTemplateHandler` so that the `server.context-path`
property is also considered when building the URL.

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

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

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

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

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

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

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

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

Fixes gh-6881
Closes gh-6882
2016-09-15 10:42:59 -07:00
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
2016-09-14 17:14:37 -07:00
Johnny Lim caa4c0800f Polish
Closes gh-6872
2016-09-13 09:25:06 +02:00
Phillip Webb c56f30fd91 Formatting 2016-09-12 12:44:31 -07:00
Stephane Nicoll ee668e6782 Polish contribution
Closes gh-6651
2016-09-12 14:53:02 +02:00
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
2016-09-12 14:42:07 +02:00
Stephane Nicoll def40bf27f Polish 2016-09-12 14:36:12 +02:00
Stephane Nicoll a347a780e7 Polish contribution
Closes gh-6649
2016-09-12 14:34:40 +02:00
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
2016-09-12 14:11:00 +02:00
Phillip Webb 56544c8dd5 Polish 2016-09-09 10:27:44 -07:00
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
2016-09-09 16:35:57 +02:00
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.
2016-09-09 10:34:49 +02:00
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
2016-09-07 16:50:25 -07:00
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
2016-09-07 10:50:39 -07:00
Johnny Lim 4b9f6869f0 Polish
Closes gh-6817
2016-09-05 09:08:08 +02:00
Andy Wilkinson 2e1988f97e Rework welcome page so that it only handles reqs that accept text/html
Closes gh-6668
2016-08-31 19:26:17 +01:00
Andy Wilkinson 3814e509a3 Polish @deprecated javadoc and link to replacements where available
Closes gh-6765
2016-08-31 14:34:49 +01:00
Andy Wilkinson d720645275 Polishing
Fix mistake introduced during forward merge
2016-08-31 14:06:37 +01:00
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
2016-08-31 14:49:15 +02:00
Andy Wilkinson b488a3d9a3 Merge branch '1.3.x' 2016-08-31 13:30:39 +01:00
Andy Wilkinson 63b8e82c10 Update OnBeanCondition to consider hierarchy for PARENTS search strategy
Closes gh-6762
2016-08-31 13:28:08 +01:00
Phillip Webb 565ad79856 Polish 2016-08-29 20:26:30 +01:00
Phillip Webb 850141c405 Merge branch '1.3.x' 2016-08-29 15:30:30 +01:00
Phillip Webb 69e96c6211 Polish 2016-08-29 15:29:54 +01:00
Andy Wilkinson 55f6fb94ef Merge branch '1.3.x' 2016-08-26 17:32:50 +01:00
Andy Wilkinson a5c6b0954d Consider ancestors when finding primary beans for ConditionalOnSingleCandidate
Closes gh-6559
2016-08-26 17:29:47 +01:00
Andy Wilkinson 6df279d3a1 Merge branch '1.3.x' 2016-08-26 14:30:49 +01:00
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
2016-08-26 13:46:56 +01:00
Stephane Nicoll 47c568a24d Polish contribution
Closes gh-6746
2016-08-26 14:24:19 +02:00
Caleb Cushing bb7b789cd9 Detect Neo4j bolt driver
Closes gh-6690
2016-08-26 13:44:02 +02:00
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
2016-08-26 13:38:17 +02:00
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
2016-08-26 11:31:46 +02:00