Commit Graph

872 Commits

Author SHA1 Message Date
Phillip Webb
1da918f388 Fix TypeNotPresentExceptionProxy error with Mongo
Update MongoAutoConfiguration so that a TypeNotPresentExceptionProxy
error is not thrown when Spring Data Mongo is not used.

Fixes gh-2196
2014-12-19 14:01:19 -08:00
Phillip Webb
bfa984ccd5 Fix PersistenceExceptionTranslation INFO message
Update PersistenceExceptionTranslationAutoConfiguration so that the
PersistenceExceptionTranslation @Bean method is static.

Fixes gh-2210
2014-12-19 13:53:00 -08:00
Phillip Webb
8d12130a2b Add exclude attribute to @SpringBootApplication
Fixes gh-2207
2014-12-19 13:52:08 -08:00
Stephane Nicoll
9a55cc49b5 Fix typo 2014-12-18 08:38:16 +01:00
Phillip Webb
0f3b959686 Scan full classpath with /templates checks
Update template auto configurations to search for template folders in
the entire classpath rather than just the root jar.

Fixes gh-2184
2014-12-17 23:10:35 -08:00
Phillip Webb
7e7acea548 Don't check for /templates when using groovy-all
Update GroovyTemplateAutoConfiguration so that the `/template`
folder check only occurs when the groovy-all jar is not being
used.

Fixes gh-2190
See gh-1915
2014-12-17 21:37:20 -08:00
Michael Cramer
3b858edfa9 Auto-configure for Thymeleaf conditionalcomments
Add auto-configuration for thymeleaf-extras-conditionalcomments which
allows parsing of conditional comments for IE.

Example:

	<!--[if lt IE 8]>
		<link rel="stylesheet" th:href="@{/styleIE.css}"
		type="text/css"/>
	<![endif]-->

Without this dialect all Thymeleaf attributes are ignored inside the
comment.

Fixes gh-2113
2014-12-17 16:23:28 -08:00
izeye
3784959b6f Rename SecurityPrequisite -> SecurityPrerequisite
Closes gh-2179
2014-12-17 15:58:59 -08:00
Dave Syer
80d55c4720 Additional condition to protect Reactor 2.0 users 2014-12-17 17:11:25 +00:00
Phillip Webb
917723a883 Automatically alias MultipartResolver beans
Update DispatcherServletAutoConfiguration to alias a MultipartResolver
that is not named correctly. This allows the DispatcherServlet to pick
up any MultipartResolver bean, regardless of its name.

See gh-2162
2014-12-16 11:30:43 -08:00
Phillip Webb
4293b7b797 Ensure CharacterEncodingFilter is ordered highest
Update HttpEncodingAutoConfiguration to ensure that the
CharacterEncodingFilter is ordered above any HiddenHttpMethodFilter.

Fixes gh-2148
2014-12-15 04:52:10 -08:00
Spring Buildmaster
1a788c1741 Next development version 2014-12-10 16:35:50 -08:00
Phillip Webb
c678c1f788 Polish 2014-12-10 13:23:26 -08:00
Oliver Gierke
034ce0ad89 Setup MongoMappingContext setInitialEntitySet
Update MongoDataAutoConfiguration to set the MongoMappingContext
initialEntitySet by scanning for @Document or @Persistent classes
from AutoConfigurationPackages.

Fixes gh-2107
2014-12-10 13:23:26 -08:00
Dave Syer
8a5f151e47 Add spring.*.enabled for MVC view resolvers
Since we use a composite ViewResolver glbally by default it can be
awkward to switch off the view technology that you have on the classpath
but aren't actually using.
2014-12-10 18:22:57 +00:00
Phillip Webb
9c66624deb Polish 2014-12-08 23:12:45 -08:00
Phillip Webb
2f03351cf6 Fix auto-configuration order for Spring Data Rest
Update Rest, Hypermedia and HttpMessageConverter auto-configuration to
ensure beans are created in the correct order.

Prior to this commit the MappingJackson2HttpMessageConverter bean would
not be created because Spring Data Rest's TypeConstrained versions had
already been registered.

Fixes gh-1729
2014-12-08 21:45:35 -08:00
Sebastien Deleuze
27d9d7fd55 Add support for autowired Jackson handlers
Inject the ApplicationContext into Jackson2ObjectMapperBuilder to allow
Jackson handlers to be autowired. See SPR-10768.

Fixes gh-2081
2014-12-08 14:25:25 -08:00
Phillip Webb
7ae75c2707 Merge branch '1.1.x' 2014-12-08 09:26:49 -08:00
Phillip Webb
fcad7c4fde Guard for null BeanFactory in @ConditionalOnBean
See gh-2080
2014-12-08 09:25:12 -08:00
Phillip Webb
1f66277fd6 Fix JmsProperties bean not found exception
Update JndiConnectionFactoryAutoConfiguration to ensure that the
JmsProperties bean is created. Prior to this commit deployment to
a WildFly would fail with a NoSuchBeanDefinitionException.

Fixes gh-2072
2014-12-05 22:46:35 -08:00
Phillip Webb
778aa39016 Add Undertow WebSocket auto-configuration
Fixes gh-2028
2014-12-03 15:35:19 -08:00
Phillip Webb
211f20b9c6 Add setIgnoreDefaultModelOnRedirect support
Add a `spring.mvc.set-ignore-default-model-on-redirect` property to
allow RequestMappingHandlerAdapter.setIgnoreDefaultModelOnRedirect to
be easily customized and change the default value to 'true'.

Fixes gh-2018
2014-12-03 11:31:09 -08:00
Phillip Webb
447c9ff204 Polish 2014-12-02 15:19:51 -08:00
Maciej Walkowiak
c74e56d185 Apply pubSubDomain property to ContainerFactory
Previously, tuning the pubSubDomain flag only impacted the created
JmsTemplate leaving any default listeners with the default settings.

If no default JmsListenerContainerFactory is defined, the created
one is using that property as well now.
2014-12-02 15:04:00 +01:00
Andy Wilkinson
f9b5c6b1ae Merge branch '1.1.x' 2014-12-02 11:22:57 +00: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
064f88a9fb Use a free port, rather than 8080, in WebSocketAutoConfigurationTests
Closes gh-2043
2014-12-02 09:46:48 +00:00
Phillip Webb
09dac5ff00 Apply formatting and cleanup rules 2014-12-01 19:35:03 -08:00
Phillip Webb
48db5457f1 Polish 2014-12-01 19:32:05 -08:00
Dave Syer
911d39f937 Ensure authentication events get published
When the user provides their own AuthenticationManager we do a lazy
initialization and didn't (till now) inject the AuthenticationEventPublisher

Fixes gh-2033
2014-12-01 17:42:18 +00:00
Stephane Nicoll
1a5916665c Remove unused RabbitMQ dynamic property flag
Fixes gh-1999
2014-11-27 14:49:35 +01:00
Stephane Nicoll
65e9d6a6e0 Add property description
Set the field javadoc of many properties that are managed via
configuration so that the "description" field is available in the
meta-data.

Closes gh-1808
2014-11-27 14:23:27 +01:00
Andy Wilkinson
40a7445fec Merge branch '1.1.x' 2014-11-26 17:51:56 +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
Oliver Gierke
123b90fa64 Register all packages where @EnableAutoConfiguration is used
Previously, when @EnableAutoConfiguration was used in multiple packages,
the last @EnableAutoConfiguration that was processed would
win and only its package would be stored as an auto-configuration
package.

This commit updates AutoConfigurationPackages to allow multiple package
name registrations. AutoConfigurationPackages.set(…) has been altered to
augment the constructor arguments of the BeanDefinition registered for
the initial call to the method so that the packages handed to the method
call will be added to the bean definition and not replace the previous
ones. The method has been renamed register(…) to reflect the changed
behavior.

Closes gh-1994
2014-11-26 11:21:58 +00:00
Andy Wilkinson
d5b7f49f83 Merge branch '1.1.x' 2014-11-26 10:22:06 +00:00
Andy Wilkinson
9270303a9a Remove double “and” from DataSourceInitializer’s javadoc 2014-11-26 10:21:57 +00:00
Andy Wilkinson
d5ad502d31 Disable Undertow auto-config if required XNIO classes are unavailable
Fixes gh-1986
2014-11-24 10:46:11 +00:00
Dave Syer
9f7bd0cddc Inject ResourceConfig instance (not class) into Jersey
If you inject the class (via a servlet parameter) it seems that
Jersey tries to create all the beans for you (and fails). I thought
it was supposed to work (according to the docs), so I'm a bit confused
but the sample now has Spring DI and the tests pass.

Fixes gh-1981
2014-11-22 17:17:53 +00:00
Phillip Webb
2a9a749329 Polish 2014-11-21 13:27:19 -08:00
Dave Syer
5b044356dc Clarify the deprecation status of HttpMapperProperties 2014-11-21 09:19:32 +00:00
Phillip Webb
70a1438c6f Don't replace MappingJackson2HttpMessageConverter
Guard against Spring Data REST TypeConstrained Jackson converters
replacing the default MappingJackson2HttpMessageConverter.

Fixes gh-1968
2014-11-20 17:36:55 -08:00
Phillip Webb
bf0629522c Only use Gson if Jackson is missing
Update HttpMessageConvertersAutoConfiguration to only register Gson
support when Jackson is not on the classpath.

Fixes gh-1967
2014-11-20 17:21:25 -08:00
Phillip Webb
2b57c5a4dd Rename spring.data.mongo.repositories.enabled
Rename mongo to mongodb.

Fixes gh-1966
2014-11-20 14:57:49 -08:00
Phillip Webb
670ba33bec Improve MongoDataAutoConfiguration
Update MongoDataAutoConfiguration to provide easier configuration of
CustomConversions, the MappingMongoConverter, MongoMappingContext
and an authentication database.

Fixes gh-1619
Fixes gh-1730
2014-11-20 14:55:19 -08:00
Phillip Webb
2a8579026f Polish 2014-11-20 10:16:33 -08:00
Stephane Nicoll
11894a5412 Fix manual metadata format inconsistency
Fixes gh-1961
2014-11-20 13:58:39 +01:00
Dave Syer
12a7df6c40 Be defensive about classloader in MessageSourceAutoConfiguration
Fixes gh-1960
2014-11-20 12:29:16 +00:00
juzer
428d2caac1 Fixed potential ClassCastException getting error
Update DefaultErrorAttributes to expect a `Throwable` ERROR_ATTRIBUTE
rather than an `Exception`.

Fixes gh-1931
2014-11-19 13:36:57 -08:00