Commit Graph

989 Commits

Author SHA1 Message Date
Stephane Nicoll
dc94fafaaa Fix dependency of AmqpAdmin
AmqpAdmin does not require a CachingConnectionFactory. Using the more
general CachingConnectionFactory provides more flexibility.

Closes gh-3220
2015-06-14 10:04:06 +02:00
Andy Wilkinson
defceec90c Reinstate support for spring.groovy.template.configuration.*
Previously, spring.groovy.template.configuration.* was mapped onto both
GroovyTemplateProperties.configuration and GroovyMarkupConfigurer. The
former being a Map and the latter being specific type with getters and
setters. This clash caused problems with the IDE support.

GroovyTemplateProperties.configuration appeared to be dead code so it
was removed in 326bdf2. Unfortunately this broke the use of
spring.groovy.template.configuration.* properties as
GroovyTemplateProperties uses a prefix of spring.groovy.template and it
no longer had a configuration property.

This commit addresses the problem by updating GroovyTemplateProperties
to ignore unknown fields. This allows
spring.groovy.template.configuration.* properties to be used and bound
to GroovyMarkupConfigurer without reintroducing the clash which prompted
the initial change.

Closes gh-3198
2015-06-10 17:53:45 +01:00
Stephane Nicoll
38cca9c1f3 Only associate JTA transaction manager to JMS factory
The JMS MessageListenerContainer supports the PlatformTransactionManager
abstraction with either a `JmsTransactionManager` for local transactions
or `JtaTransactionManager` for distributed transactions. The former is
kind of deprecated (`setTransacted` should be used instead). In any case,
any other `PlatformTransactionManager` implementation is not supported.

Update JmsAnnotationDrivenConfiguration to only associated a JTA
transaction manager, if any.

Closes gh-3150
2015-06-08 15:07:03 +02:00
Dave Syer
1c0bcc13cf Set UserDetailsService in default AuthenticationManagerBuilder
Only affects the default AuthenticationManagerBuilder (so when users
are not overriding the default global user details). Makes the
UserDetailsService effectively available as it would be if we used
AuthenticationManagerBuilder.inMemoryAuthentication() as a
shared object in the HttpSecurity.

Fixes gh-3152
2015-06-08 13:14:12 +01:00
Spring Buildmaster
5d81c87b43 Next Development Version 2015-06-04 00:49:11 -07:00
Phillip Webb
df8c311280 Add OrderedHiddenHttpMethodFilter
Add OrderedHiddenHttpMethodFilter and use it in WebMvcAutoConfiguration
to ensure that it is applied before Spring Security.

Fixes gh-2773
2015-06-02 15:20:20 -07:00
Phillip Webb
968b68c322 Polish 2015-06-02 11:17:16 -07:00
Stephane Nicoll
160f2d341f Fix Gzip filter properties
Fix `excludeAgentPatterns`, `excludePaths` and `excludePathPatterns`
properties. Introduce `excludedMimeTypes` property.

Fixes gh-3042
2015-05-26 15:00:54 +02:00
Craig Walls
88d72e0598 Upgrade to Spring Social Facebook 2.0.1.RELEASE
While this is a breaking change, continuing with Spring Social
Facebook 1.1.x is also broken as it is no longer compatible with
Facebook's API. Upgrading to 2.0.1.RELEASE may require some changes
to be made to users' applications, but it will allow their
applications to use the Facebook API once again.

Closes gh-2837
2015-05-06 15:08:45 +01:00
Andy Wilkinson
dabbb02dfe Prevents tests that use Elasticsearch from polluting the filesystem
By default, Elasticsearch writes it data to ./data. This led to data
being left on the filesystem after a mvn clean which could cause
failures when moving between branches that use different versions of
Elasticsearch.

This commit updates the tests for the Elasticsearch sample and
the Elasticsearch auto-configuration classes to write the
Elasticsearch data and logs into the target directory.
2015-04-21 14:53:43 +01:00
Stephane Nicoll
326bdf29c2 Remove unused configuration map
Remove the configuration map defined in `GroovyTemplateProperties` which
isn't used. Ironically, that configuration map was exposed with the exact
same prefix as `GroovyMarkupConfigurer`, which broke IDEs support since
two entries had the exact same prefix.

Fixes gh-2840
2015-04-21 13:33:31 +02:00
Andy Wilkinson
337673b31d Support String values for factoryBeanObjectType attribute on bean def
To allow us to determine the type that Spring Integration’s
GatewayProxyFactoryBean will create, the bean definition created by
MessagingGatewayRegistrar needs to set the factoryBeanObjectType
attribute. The current implementation of BeanTypeRegistry requires the
attribute’s value to be a Class, however this would require Spring
Integration’s namespace handler to load the class and class loading
should be avoided in namespace handlers.

This commit updates BeanTypeRegistry so that it supports both Class and
String values for the factoryBeanObjectType. If the value is a String
it will interpret it as a class name and attempt to load it.

See gh-2811
2015-04-16 09:42:50 +01:00
Andy Wilkinson
4f988d2aec Polish log message in AutoConfigurationReportLoggingInitializer 2015-04-14 10:19:59 +01:00
Stephane Nicoll
0f14210937 Polish documentation 2015-04-14 09:51:14 +02:00
izeye
b45bb6d082 Make all of GsonHttpMessageConvertersConfiguration conditional on Gson
Previously GsonHttpMessageConvertersConfiguration was unconditional
with its nested configuration class being
@ConditionalOnClass(Gson.class). This led to the unnecessary
registration of the GsonHttpMessageConvertersConfiguration bean when
Gson isn't on the classpath.

This commit moves the condition up onto the outer class so that no
Gson-related beans are created when Gson is not on the classpath.

Closes gh-2778
2015-04-08 15:56:39 +01:00
Andy Wilkinson
5547f91bfb Correct name of check-template-location property in error message
Closes gh-2788
2015-04-08 15:48:54 +01:00
Andy Wilkinson
d4ffab2f02 Provide additional config metadata for spring.http.gzip.enabled
See gh-2776
2015-04-07 11:40:05 +01:00
Andy Wilkinson
212520fa15 Add a property to disable auto-configuration of GzipFilter
Closes gh-2776
2015-04-07 11:24:24 +01:00
Spring Buildmaster
e03c11dda8 Next development version 2015-03-30 22:56:20 -07:00
Dave Syer
18afe8bd0c Fixup incorrect property name
The property in XADataSourceAutoConfigurationTests should be
`data-source-class-name`. Previously the `-name` was missing.
2015-03-30 16:45:02 -07:00
Phillip Webb
e3f203a8a5 Polish 2015-03-30 10:22:54 -07:00
Andy Wilkinson
c3571d416a Improve YAML-based configuration of Tomcat compression
Tomcat uses the strings “on” and “off” to enable and disable
compression. YAML interprets on as true and off as false, leaving
ServerProperties.Tomcat.compression configured with “true” and “false”
respectively. One solution is to use “on” rather than on and “off”
rather than off in the YAML file but users may not realise that they
need to do so.

This commit updates the connector customiser that configures compression
to map “true” to “on” and “false” to “off”.

Closes gh-2737
2015-03-30 10:56:07 +01:00
Andy Wilkinson
0da24f82e3 Polishing: move tests for mustache.web into the correct package 2015-03-26 18:02:43 +00:00
Andy Wilkinson
dd748eda19 Use the configured charset, if any, in MustacheViewResolver
Closes gh-2670
2015-03-26 18:02:37 +00:00
Andy Wilkinson
219317e8c7 Make web security config require spring-security-web on classpath
Previously, SpringBootWebSecurityConfiguration required a web
application and @EnableWebSecurity to be on the classpath.
@EnableWebSecurity is in spring-security-config so this could lead
to the configuration being active when spring-security-web isn't
on the classpath but the rest of Spring Security is.

This commit updates SpringBootWebSecurityConfiguration to also make it
conditional on a class in spring-security-web.

Fixes gh-2717
2015-03-25 17:22:30 +00:00
Raphael Ackermann
1235a35f2a fix typo in javadoc
{@code tomat-embedded.jar} --> {@code tomcat-embedded.jar}
2015-03-23 11:08:48 +01:00
Andy Wilkinson
0a38b9b3ab Enable the configuration of arbitrary Elasticsearch client properties
Previously, only a handful of properties could be set when
auto-configuring an Elasticsearch client. This commit introduces support
for configuring arbitrary properties using the
spring.data.elasticsearch.properties prefix. For example,
client.transport.sniff can be configured using
spring.data.elasticsearch.properties.client.transport.sniff.

Closes gh-1838
2015-03-18 14:06:11 +00:00
Andy Wilkinson
89b4cac8b0 Allow Elasticsearch client-transport-sniff to be configured via the env
Previously, a TransportClient sniff property could not be configured
while using Spring Boot’s Elasticsearch auto-configuration. This commit
adds a new property, spring.data.elasticsearch.client-transport-sniff,
that can be used to configure the TransportClient while continuing to
use the auto-configuration support.

Closes gh-1838
2015-03-17 11:48:55 +00:00
Phillip Webb
16495d223a Polish 2015-03-16 14:11:43 -07:00
Phillip Webb
bdd61b8ec2 Merge branch '1.1.x' into 1.2.x 2015-03-16 13:51:57 -07:00
Phillip Webb
8b979fa2e6 Polish 2015-03-16 13:43:16 -07:00
Andy Wilkinson
1f40c8a9ba Tolerate breaking API changes in ActiveMQ 5.11.0
In ActiveMQ 5.11 the signature of
PooledConnectionFactory.setConnectionFactory has changed. It now takes
an Object rather than a ConnectionFactory. This change is not binary
backwards compatible so it causes a NoSuchMethodError as we compile
against 5.10.

This commit updates ActiveMQConnectionFactoryConfiguration to call
the setConnectionFactory method reflectively, looking for both the
ConnectionFactory and Object variants.

Closes gh-2640
2015-03-16 17:41:38 +00:00
Dave Syer
f1ecf53495 Delay instantiation of DataSource as late as possible
Unfortunately it still has to happen in a @PostConstruct (otherwise
JPA never sees the schema in time), but we can delay a bit by not
using @Autowired. Appears to fix the Spring Cloud problem
(https://github.com/spring-cloud/spring-cloud-config/issues/105).

Fixes gh-2658
2015-03-16 09:18:00 +00:00
Andy Wilkinson
71dde3ec89 Tolerate removal of JacksonJodaFormat in Jackson 2.5
We currently officially support Jackson 2.4, but some users wish to
use Jackson 2.5. This causes a failure as JacksonAutoConfiguration
depends on JacksonJodaFormat which exists in 2.4 but not in 2.5. This
commit updates JodaDataTimeJacksonConfiguration to make it conditional
on JacksonJodaFormat being on the classpath. This means that Jackson
2.5 users will not have configurable DateTime formatting
(added in 201fb5e5) but things will generally work once again.

Closes gh-2573
2015-03-04 17:52:01 +00:00
Rob Winch
493d7a364d Merge branch '1.1.x' into 1.2.x 2015-03-02 14:52:08 -06:00
Rob Winch
760d6eceee Fix Unnecessarily Adding Default Security User
Fixes gh-2567
2015-03-02 14:45:50 -06:00
Spring Buildmaster
8f0ad02237 Next development version 2015-02-26 15:26:53 -08:00
Spring Buildmaster
aea68f0c32 Next development version 2015-02-26 13:01:31 -08:00
Andy Wilkinson
80111c801a Consider custom authentication database when creating MongoClient
Previously, MongoProperties did not consider the configuration of a
custom authentication database when creating a MongoClient. This
commit updates MongoProperties to use the authentication database
when it is configured, falling back to the normal database when it is
not configured.

Closes gh-2562
2015-02-26 15:30:02 +00:00
Stephane Nicoll
1e3a057786 polish meta-data description 2015-02-26 10:31:00 +01:00
izeye
0073ab078d Remove unnecessary if statement 2015-02-26 08:30:11 +01:00
izeye
2e7ad2252f Fix Javadoc 2015-02-26 08:24:56 +01:00
Phillip Webb
1231da1c2f Add security.basic.authorize-mode property
Add a `security.basic.authorize-mode` property that can be used to
affect how basic security authorization is applied.

Fixes gh-2462
2015-02-25 12:36:55 -08:00
Phillip Webb
f7221be7c9 Rename spring.favicon.enabled property
Rename `spring.favicon.enabled` to `spring.mvc.favicon.enabled`.

See gh-2377
2015-02-25 11:36:28 -08:00
Phillip Webb
c1dcd85f60 Simplify MustacheEnvironmentCollector
Simplify the MustacheEnvironmentCollector so that it no longer binds
the Spring Environment to a Map.

See gh-2242
2015-02-24 21:44:49 -08:00
Phillip Webb
cdf785a8d1 Fix index.html root path forwarding
Fix automatic '/' -> 'index.html' forwarding to also work when a
`server.servlet-path` property is set.

Fixes gh-2351
2015-02-24 18:27:44 -08:00
Phillip Webb
a1cbd93d6b Ensure local Elasticsearch nodes are closed
Update ElasticsearchAutoConfiguration to ensure that local nodes are
closed when the context is closed. Prior to this commit the close()
method of the Client would be called which had no effect for local
Nodes.

Fixes gh-2480
2015-02-24 14:18:51 -08:00
Phillip Webb
5c4b698f86 Support string names @AutoConfigureBefore/After
Update @AutoConfigureBefore and @AutoConfigureAfter annotations to
support String classnames in addition direct Class references.

Fixes gh-2529
2015-02-24 14:03:01 -08:00
Phillip Webb
24fd4a1c7f Relax MultipartConfigElement condition
Allow MultipartConfigElement bean to be created even if a
MultipartResolver bean has been defined by the user.

Fixes gh-2538
2015-02-24 13:34:45 -08:00
Phillip Webb
7943195d51 Rename RepositoryRestMvcBootConfiguration
Rename RepositoryRestMvcBootConfiguration to
SpringBootRepositoryRestMvcConfiguration so that it follows the same
naming pattern as other custom Spring Boot configurations.

See gh-2392
2015-02-23 21:16:35 -08:00