Commit Graph

1037 Commits

Author SHA1 Message Date
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
Phillip Webb
56e31a8c6b Polish 2015-02-23 19:21:37 -08:00
Phillip Webb
10257d96f2 Merge branch '1.1.x' 2015-02-23 18:02:23 -08:00
Phillip Webb
8a8b5d3aa7 Polish 2015-02-23 13:34:55 -08:00
Andy Wilkinson
6253cc5dc7 Merge branch '1.1.x' 2015-02-19 11:26:50 +00: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
67ec89e74d Merge branch '1.1.x' 2015-02-19 10:41:43 +00:00
Andy Wilkinson
8622e5db20 Apply f9816ea and 64e94f3 to 1.1.x
Fixes gh-2473
2015-02-19 10:38:40 +00:00
Andy Wilkinson
64e94f3b1b Correct javadoc syntax and apply code formatting 2015-02-18 16:52:30 +00:00
Andy Wilkinson
9af30450c4 Upgrade to Liquibase 3.3.2
Closes gh-2512
2015-02-18 16:20:47 +00:00
Rob Winch
f9816ead93 Fix configureGlobal on SpringBootApplication
Fixes gh-2473
2015-02-18 09:15:46 +00:00
Rob Winch
e42fa79f7b Fix fragile AuthenticationManagerConfiguration
Fixes gh-2474
2015-02-18 09:15:46 +00:00
Andy Wilkinson
201fb5e534 Make Joda DateTime serialization format configurable
We allow the serialization format of dates to be configured using
spring.jackson.date-format. However, this property only applies to
java.util.Date instances and has no effect on a Joda DateTime.

This commit updates our auto-configuration for Jackson to allow
the format string that is used to  serialize a Joda DateTime to be
configured. A new property, spring.jackson.joda-date-time-format has
been introduced. When configured, it is used to configure the
serialization format for a Joda DateTime. When it is not configured,
we fall back to using spring.jackson.date-format. If this fails,
either because the format string is incompatible (unlikely) or because
the user's configured the fully-qualified name of a DateFormat class,
a warning is logged encouraging the use of
spring.jackson.joda-date-time-format.

Fixes gh-2225
2015-02-12 16:07:53 +00:00
Andy Wilkinson
f11bcb9495 Register Module beans with Jackson2ObjectMapperBuilder
Prior to this commit, Module beans were registered with all
ObjectMapper beans, but were not registered with the auto-configured
Jackson2ObjectMapperBuilder. This meant that any ObjectMapper created
with the builder but not exposed as a bean would not have the Module
beans registered with it. One such ObjectMapper is the one used by the
auto-configured MappingJackson2XmlHttpMessageConverter. This caused
XML (de)serialization to be different to JSON (de)serialization.

This commit updates JacksonAutoConfiguration to register all of the
application context's Module beans with the auto-configured
Jackson2ObjectMapperBuilder. This ensures consistent configuration
of any ObjectMapper that's created using the builder, irrespective of
whether or not that ObjectMapper is also exposed as a bean, and
also ensures that (de)serialization of JSON and XML is consistent.

See gh-2327
2015-02-12 13:52:13 +00:00
Dave Syer
0899ffdadf Add realm name to 401 responses from basic auth
Since the BasicAuthenticationEntryPoint does its own
challenge when authentication fails, we need to add that
entry point in the SpringBootWebSecurityConfiguration
explicitly.

Fixes gh-2483
2015-02-12 12:07:59 +00:00
Stephane Nicoll
1035e5b029 Expose RepositoryRestMvcBootConfiguration
If an application defines a custom RepositoryRestMvcConfiguration, all
Spring Boot defaults are lots. While this sounds sensible, it can be
confusing as Spring Boot exposes properties (`spring.data.rest.*`) that
are no longer honored.

RepositoryRestMvcBootConfiguration is now public and can be used as an
extension point for those who need to customize the Spring Data REST
configuration and keep boot's specific defaults.

Fixes gh-2392
2015-02-10 16:00:11 +01:00
Andy Wilkinson
11b7fd832d Report non-matching outer class conditions
Update ConditionEvaluationReport so that, whenever a negative outcome
is added for a source, any existing outcomes for inner classes of that
source are updated with a non-matching outcome that indicates that the
outer configuration did not match.

Conditions are evaluated in two phases; PARSE_CONFIGURATION first and
REGISTER_BEAN second. If a parent class’s conditions match in
PARSE_CONFIGURATION then its inner classes will have their
PARSE_CONFIGURATION conditions evaluated. If they all match, the inner
class will be reported as a positive match in the auto-configuration
report even if the outer class does not match as a result of the
subsequent evaluation of a REGISTER_BEAN condition.

Fixes gh-2122
2015-02-09 14:05:12 -08:00
Phillip Webb
636898f9ad Polish 2015-02-09 11:39:48 -08:00
Andy Wilkinson
5922cfa41f Avoid use of SimpleNamingContextBuilder as it pollutes JVM’s JNDI config
Closes gh-2397
2015-02-09 13:44:30 +00:00
Andy Wilkinson
82d1e61ab1 Prevent attempt to export MBean for DataSource retreived from JNDI
Tomcat 8's default DataSource implemention is an MBean. Previously,
when such a DataSource was consumed from JNDI and an MBeanExporter had
been auto-configured an attempt would be made to export this MBean to
the MBean server. This would fail due to Tomcat having already
registered the MBean.

This commit updates JndiDataSourceAutoConfiguration to instruct the
MBeanExporter (if there is one) not to export a DataSource MBean
that's been retrieved from JNDI. The assumption is that any MBean in
JNDI will have already been registered with the MBean server by the
same infrastructure that registered it with JNDI.

Fixes gh-2397
2015-02-09 13:05:07 +00:00
Andy Wilkinson
b4cb7a35c9 Document spring.http.converters.preferred-json-mapper
See gh-2247
2015-02-05 12:06:19 +00:00
Andy Wilkinson
b39ecdf006 Rename preferred-mapper property so its clear it only applies to JSON
preferred-mapper has been renamed to preferred-json-mapper to make it
clear that it only affects the JSON mapper and that the XML mapper
that will be used (if any) is unaffected

See gh-2247
2015-02-05 11:01:29 +00:00
Andy Wilkinson
230048ae8b Prefer Jackson unless user explicity states preference for Gson
This commit rewords the changes made in d718a80 so that simply adding
Gson to the classpath isn't sufficient to stop Jackson being used
for HTTP JSON mapping. To use Gson, the user must now either remove
Jackson from the classpath (not an option if they also wish to use
the Actuator) or configure the spring.http.converters.preferred-mapper
property with a value gson.

Closes gh-2247
2015-02-05 10:56:26 +00:00
Andy Wilkinson
aca47ab67e Allow FaviconConfiguration to be disabled
Setting spring.favicon.enabled to false will now disable the
/**/favicon.ico handler mapping.

Closes gh-2377
2015-02-04 18:02:09 +00:00
Andy Wilkinson
d718a80316 Make it easier to use Gson and the Actuator at the same time
Previously the recommendation when a user wanted to use Gson was to
exclude Jackson from the classpath and add Gson. This worked fine until
the user also want to use the Actuator which requires Jackson. To get
over this hurdle the user could leave Jackson on the classpath and
perform their own HttpMessageConverter configuration and register a
GsonHttpMessageConverter instead of or before any Jackson-based
converter. A little complicated, but it worked.

This commit makes things easier by updating the auto-configuration for
HTTP message converters to prefer Gson when both Gson and Jackson are
on the classpath, i.e. in the presence of both, a
GsonHttpMessageConverter will be auto-configured and a
MappingJackson2HttpMessageConverter won’t be. This allows an
application to easily use Gson while allowing the Actuator to continue
to use Jackson.

Closes gh-2247
2015-02-04 17:34:14 +00:00
Phillip Webb
8e398dc6a7 Polish Javadoc
Update Javadoc to add missing @return and @param elements.
2015-02-03 11:35:06 -08:00
Phillip Webb
3d9cf06c31 Log OnBeanCondition.addDeducedBeanType errors
Update addDeducedBeanType.addDeducedBeanType to log any exceptions at
debug level.

Fixes gh-2436
2015-02-02 20:55:47 -08:00
Phillip Webb
0696695e16 Add package javadoc 2015-02-02 17:05:38 -08:00
Phillip Webb
ccdbfd274f Fix Java 8 Javadoc compatibility
Update Javadocs to fix errors caused by Java 8 aggressive linting.

Fixes gh-2233
2015-02-02 17:05:37 -08:00
Phillip Webb
072f873f34 Polish 2015-02-01 21:37:17 -08:00
Phillip Webb
3328c1369f Merge branch '1.1.x'
Conflicts:
	spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
2015-02-01 20:28:11 -08:00
Phillip Webb
555827cad7 Polish 2015-02-01 20:00:11 -08:00
Stephane Nicoll
763a735bd5 Merge branch '1.1.x'
Conflicts:
	spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportProperties.java
	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java
2015-01-29 16:45:00 +01: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
528a632fd1 Allow XA DataSource and ConnFactory pools to be configured via the env
This commit adds support for configuring the XA DataSource and
ConnectionFactory pools created by Atomikos and Bitronix via the
environment. The property prefixes vary depending on the transaction
manager that’s in use. They are:

Bitronix:
 - spring.jta.bitronix.datasource
 - spring.jta.bitronix.connectionfactory

Atomikos:
 - spring.jta.atomikos.datasource
 - spring.jta.atomikos.connectionfactory

The configuration processor has been updated to ignore
javax.jms.XAConnectionFactory and javax.sql.XADataSource as neither of
these types can be created via property binding.

Closes gh-2027
2015-01-27 10:55:56 +00:00
Andy Wilkinson
b542aa3de6 Configure Hibernate with a WAS-specific JtaPlatform when running on WAS
At the time of writing WAS only supports JPA 2.0 which means that
Hibernate 4.2 is the latest version that can be used. SpringJtaPlatform
is Hibernate 4.3-specific as JtaPlatform’s package changed between
Hibernate 4.2 and 4.3. This means that SpringJtaPlatform can’t be used
on current versions of WAS. Futhermore, SpringJtaPlatform won’t work on
WAS even if we could use Hibernate 4.3 as WAS doesn’t make its
TransactionManager available to application code (it’s considered too
dangerous for general consumption) and SpringJtaPlatform
requires a TransactionManager.

This commit updates HibernateJpaAutoConfiguration to always treat WAS as
a special case and configure Hibernate with one of its WAS-specific
JtaPlatform implementations. 

Closes gh-2326
2015-01-21 18:09:23 +00:00
Andy Wilkinson
42e1a0b069 Add a test to verify customization of Hibernate's JtaPlatform
Closes gh-2348
2015-01-20 09:07:57 +00:00
Manuel Doninger
c45604b825 Ensure that Hibernate's JtaPlatform can be customized
Previously, when JpaProperties was applying additional properties it
discarded any existing properties. This meant that custom
configuration of Hibernate's JtaPlatform was not detected and that
Boot's SpringJtaPlatform would always be configured instead.

This commit updates JpaProperties to include all of the existing
properties when it's asked to apply any additional properties.

See gh-2348
Closes gh-2359
2015-01-20 09:07:48 +00:00
Andy Wilkinson
966e8e557d Make use of Collections.addAll instead of a for-loop where appropriate
Closes gh-2309
2015-01-19 13:20:46 +00:00
Brian Clozel
6d60c23460 Disable Accept-Charset Header in String converter
This commit prevents the `Accept-Charset` from being written by the
StringHttpMessageConverter. This feature is enabled by default in the
framework and writes a *quite long* response header with all charsets
supported by the server.

Closes gh-2370, see gh-1800
2015-01-16 17:39:56 +01:00
Andy Wilkinson
69ea4beb8a Add auto-configuration for Jetty’s GzipFilter
Jetty’s GzipFilter is a container-agnostic Filter that can be used to
provide gzip and deflate encoding of HTTP responses. This commit adds
auto-configuration for GzipFilter that is enabled when
org.eclipse.jetty:jetty-servlets is on the classpath. The filter can
be configured using spring.http.gzip.*

See gh-2031
2015-01-16 12:07:28 +00:00
Andy Wilkinson
ec17c00126 Add support for configuring Tomcat’s gzip support using the environment
Tomcat provide built-it support for gzip compression of HTTP responses.
This commit adds support for enabling and configuring this compression
via the environment using server.tomcat.compression and
server.tomcat.compressableMimeTypes.

See gh-2031
2015-01-16 12:07:28 +00:00
Phillip Webb
735b6277c2 Relax WebSocket auto-configuration conditions
Update WebSocketAutoConfiguration so that spring-websocket is no longer
required for WebSocket support.

See gh-2341
2015-01-13 15:42:14 -08:00
Andy Wilkinson
01444a03ab Merge branch '1.1.x' 2015-01-13 17:55:25 +00: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
Dave Syer
5e0cc71862 Add convenient logging.properties for testing 2015-01-13 11:29:39 +00:00
Phillip Webb
3fc1e44302 Polish Mustache code 2015-01-12 13:16:23 -08:00
Dave Syer
2729c747ca Add jmustache support
The package names changed a bit from the prototype project, but wuth vanilla
autconfiguration usage that shouldn't matter. Follows closely the Groovy
templates support. Templates live in classpath:/templates/*.html by default.

Fixes gh-2242
2015-01-09 13:50:39 +00:00
Spring Buildmaster
60725cd8bd Next development version 2015-01-07 23:37:07 -08:00
Phillip Webb
4c6907d5d8 Remove superfluous \n when logging password
The last trailing `\n` is not required as the logging system will add
it.

See gh-2146
2015-01-07 14:49:02 -08:00
Phillip Webb
1f775793ee Use Collections.addAll(...) instead of for loops
Replace various for loops which add items to collections with calls
to Collections.addAll(...).

Fixes gh-2277
2015-01-04 11:49:06 -08:00
Phillip Webb
6333d4c617 Merge branch '1.1.x'
Conflicts:
	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfiguration.java
	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/ParentAwareNamingStrategy.java
	spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java
2015-01-02 15:31:39 -08: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