Commit Graph

635 Commits

Author SHA1 Message Date
Spring Buildmaster
b8d2a55b30 Next development version 2015-03-30 18:23:16 -07:00
Phillip Webb
8b979fa2e6 Polish 2015-03-16 13:43:16 -07:00
Rob Winch
760d6eceee Fix Unnecessarily Adding Default Security User
Fixes gh-2567
2015-03-02 14:45:50 -06:00
Spring Buildmaster
aea68f0c32 Next development version 2015-02-26 13:01:31 -08:00
Phillip Webb
8a8b5d3aa7 Polish 2015-02-23 13:34:55 -08:00
Andy Wilkinson
df81b3145f Backport to 1.1.x the fix for gh-2474 (originally made in e42fa79f7) 2015-02-19 11:22:06 +00:00
Andy Wilkinson
8622e5db20 Apply f9816ea and 64e94f3 to 1.1.x
Fixes gh-2473
2015-02-19 10:38:40 +00:00
Phillip Webb
555827cad7 Polish 2015-02-01 20:00:11 -08:00
Stephane Nicoll
d64cc082db Harmonize property name
The property default format is lower case using hyphen. The JMX default
domain property has been harmonized to that format.

Fixes gh-2427
2015-01-29 16:42:24 +01:00
Andy Wilkinson
b875a00ebd Tighten up conditions: a web application may not be using Spring MVC
Previously, some classes that were annotatated with
@ConditionalOnWebApplication assumed that, if the application was a
web application, Spring MVC (spring-webmvc) would be on the classpath.
If it was not, the application would fail to start, typically with an
error relating to WebMvcConfigurerAdapter being unavailable.

This commit updates the affected configuration classes and annotates
them with @ConditionalOnClass(WebMvcConfigurerAdapter.class) to
ensure that their auto-configuration only takes effect if its a web
application and Spring MVC is on the classpath.

Fixes gh-2345
2015-01-13 17:51:10 +00:00
Phillip Webb
7e771bb655 Fix ParentAwareNamingStrategy and JMX auto-config
Fix ParentAwareNamingStrategy to set ObjectName properties for the
'identity' and 'context' attributes. Also update JmxAutoConfiguration
to ensure that the ParentAwareNamingStrategy is created in each context
and that the `mbeanExporter` bean is created. Prior to this commit the
nested @EnableMBeanExport class always meant that the mbeanExporter
condition never matched.

Fixes gh-2243
2015-01-02 15:07:44 -08:00
Phillip Webb
c46478f97d Guard for multiple ContentNegotiatingViewResolvers
Update WebMvcAutoConfiguration to ensure than the viewResolver bean
is not created if a user defined ContentNegotiatingViewResolver bean
is defined.

Fixes gh-2269
2015-01-02 11:32:04 -08:00
Dave Syer
f4e12e96c6 Additional condition to protect Reactor 2.0 users
(cherry picked from 80d55c47)
Closes gh-2255
2014-12-30 15:39:13 -08:00
Phillip Webb
96d479c3d9 Make RequestMappingHandlerMapping @Primary
Update WebMvcAutoConfiguration so that the RequestMappingHandlerMapping
bean is @Primary. Prior to this commit a NoUniqueBeanDefinitionException
would be thrown then using the MvcUriComponentsBuilder.

Fixes gh-2237
2014-12-26 11:42:10 -08:00
Spring Buildmaster
63e6a25097 Next development version 2014-12-10 18:06:30 -08:00
Phillip Webb
fcad7c4fde Guard for null BeanFactory in @ConditionalOnBean
See gh-2080
2014-12-08 09:25:12 -08:00
Andy Wilkinson
3b78aa9493 Make Security auto-config conditional on spring-security-config
SecurityAutoConfiguration, via its import of
AuthenticationManagerConfiguration, requires spring-security-config
to be on the classpath as AuthenticationManagerConfiguration extends
GlobalAuthenticationConfigurerAdapter from spring-security-config.

This commit makes SecurityAutoConfiguration conditional on the
presence of GlobalAuthenticationConfigurerAdapter so that the
auto-configuration will be disabled in its absence rather than causing
an app to fail to start.

Closes gh-2046
2014-12-02 11:18:23 +00:00
Andy Wilkinson
64599261a5 Allow mongo port, host, and credentials to be configured individually
Previously, the host had to have a custom value for the configuration
of the port or credentials (username and password) to take effect. This
meant, for example, that you couldn’t just set the port or just set the
username and password while using the default host.

This commit allows the port or username and password to be configured
without also configuring the host. The default host (localhost) and
port (27017) are retained.

Fixes gh-2008
2014-11-26 17:34:21 +00:00
Andy Wilkinson
9270303a9a Remove double “and” from DataSourceInitializer’s javadoc 2014-11-26 10:21:57 +00:00
Andy Wilkinson
863c099161 Add missing copyright headers 2014-11-18 21:29:54 +00:00
Andy Wilkinson
9eae29938c Test that http.mappers props are applied by JacksonAutoConfiguration
Closes gh-1919
2014-11-18 11:47:29 +00:00
Nicolás J. García
f51b304c2a Update JackonAutoConfiguration to apply all http.mappers properties
Previously, only the http.mappers.json-sort-keys property was applied
by JacksonAutoConfiguration. This commit updates it to also apply the
http.mappers.json-pretty-print property as well.

See #1919
2014-11-18 11:40:29 +00:00
Spring Buildmaster
46b7738334 Next development version 2014-11-11 17:12:24 -08:00
Phillip Webb
4f67a20214 Ensure JpaUserDetailsTests closes embedded DB
Fixes gh-1712
2014-11-10 18:43:46 -08:00
Phillip Webb
b79934a7a4 Detect existing MultipartResolver beans
Update MultipartAutoConfiguration to detect any MultipartResolver beans
rather than just StandardServletMultipartResolvers.

Fixes gh-1857
2014-11-10 17:21:21 -08:00
Phillip Webb
8ba71c88f5 Polish 2014-11-01 19:46:04 -07:00
Dave Syer
b20d02a31d Make a lazy AuthenticationManager if we think it's already configured
Instead of just blindly creating the default authentication manager, after
thic change we count the beans of type GlobalAuthenticationManagerConfigurer
and assume that if we detect more than we expect (one from Boot and one from
Spring Security) then the user is telling us they want to configure the
AuthenticationManager themselves.

Fixes gh-1801
2014-11-01 18:10:27 +00:00
Andy Wilkinson
0f17142366 Make GroovyWebConfiguration conditional on spring-webmvc's availability
GroovyWebConfiguration creates a GroovyTemplateViewResolver which is
a UrlBasedViewResolver sub-class. UrlBasedViewResolver is provided
by spring-webmvc. Previously, if a user configured a web application
but did not have spring-webmvc on the classpath, the application
would fail to start with a NoClassDefFoundError for
UrlBasedViewResolver.

This commit makes GroovyWebConfiguration conditional on
UrlBasedViewResolver being on the classpath so that it backs of in
the absence of spring-webmvc.

Fixes gh-1793
2014-10-30 15:18:39 +00:00
Andy Wilkinson
e2dd659dd1 Include condition's location (class or method name) in message
Closes gh-1787
2014-10-29 17:51:17 +00:00
Phillip Webb
41b2e58476 Polish 2014-10-21 13:13:39 -07:00
Andy Wilkinson
9a2d654eba Rename test classes so that their tests are run by Maven 2014-10-15 16:35:48 +01:00
Andy Wilkinson
fff94733ef Rename class so Maven runs its tests
Maven is configured to run tests found in classes ending in Tests.
This meant that the tests in BasicErrorControllerIntegrationTest (note
the missing s) were not being run.

This commit renames the test class so that it's picked up by Maven.
2014-10-15 16:05:25 +01:00
Dave Syer
ecee19057c Add some precautionary tests for documenting AuthenticationManager config 2014-10-15 11:31:44 +01:00
Spring Buildmaster
3e71a21b30 Next development version 2014-10-10 15:19:47 -07:00
Phillip Webb
6009f41782 Polish 2014-10-09 12:58:55 -07:00
Dave Syer
3135c7f8ae Escape strings in whitelabel error page (HTML) 2014-10-09 16:10:57 +01:00
Phillip Webb
d0990c06a6 Fix typo in HttpMessageConverters auto-conf Tests 2014-09-25 22:03:30 -07:00
Spring Buildmaster
edb4b7ed7d Next development version 2014-09-25 21:02:37 -07:00
Phillip Webb
bff39e954e Add server.tomcat.port-header support
Update Tomcat ServerProperties to support the RemoteIpValve portHeader
property.

Fixes gh-1616
2014-09-25 13:04:12 -07:00
Phillip Webb
0dc46a2fe7 Drop protocolHeader and remoteIpHeader defaults
The `protocolHeader` and `remoteIpHeader` no longer have default values
and must be opt-in.

Fixes gh-1624
2014-09-25 12:58:23 -07:00
Phillip Webb
258059ea08 Fix failing ThymeleafAutoConfigurationTests
Remove accidental addition of a 1.2 test.
2014-09-25 10:27:05 -07:00
Dave Syer
304920df07 Make Thymeleaf @ConditionalOnWebApplication
If user creates a Thymeleaf app with a parent-child context then the
child should contain all the web-specific pieces (and they are likely
to fail fast if they need to be ServletContextAware, or slower if they
try to locate a WebApplicationContext at runtime). This can't happen
if the view resolver is being added to the parent.

Freemarker and Velocity already have similar tests because it is assumed
that they should be usable outside a web app, so this change just does the
same for Thymeleaf.

Fixes gh-1611
2014-09-25 09:54:50 -07:00
Phillip Webb
0b50fe4eff Support String to char[] bindings
Update RelaxedConversionService to also support String to char[]
conversion. Primarily to support the `password` field in
MongoProperties.

Fixes gh-1572
2014-09-24 16:03:51 -07:00
Andy Wilkinson
cf22e28ddc Add tests to verify that ActiveMQAutoConfiguration backs off
See gh-1599
2014-09-23 10:11:26 +01:00
Tomas Lin
38d8a5cda0 Fix typo in comment
Closes gh-1596
2014-09-23 09:42:03 +01:00
Phillip Webb
468db03aef Formatting 2014-09-19 22:41:10 -07:00
Dave Syer
d6165d97dd A few tweaks that might improve performance on startup
... or couldn't hurt anyway.

1. Extends the definition of a web application for @ConditionalOnWebapp
so that a StandardEnvironment can be used (cutting out JNDI failures
for Environment properties)

2. Doesn't bother using StandardServletEnvironment in integration tests

3. Make the NON_ENUMERABLE_ENUMERABLES in PropertySourcesPropertyValues
static so they only get initialized once (not a huge issue at all)
2014-09-19 16:11:10 +01:00
Andy Wilkinson
6dcaec2fef Make all @Bean methods public
This is a continuation of the changes made in 611f978. It makes some
more @Bean methods public and adds tests to spring-boot-actuator and
spring-boot-autoconfigure to prevent against non-public methods being
introduced in the future

Closes gh-1571
2014-09-17 19:39:39 +01:00
Phillip Webb
611f978181 Make all @Bean methods public
Fixes gh-1571
2014-09-17 10:45:23 -07:00
Phillip Webb
62a5ce52d0 Backport Jetty/Tomcat SSL support
Fixes gh-1570
Cherry-picked from 0960908 and 258c6f1
2014-09-17 10:08:05 -07:00