Commit Graph

1172 Commits (04728a17e6ffc1006a7bf9ce727ed28e94dde8b8)

Author SHA1 Message Date
Andy Wilkinson 2159190713 Merge branch '1.2.x' 10 years ago
Andy Wilkinson b1ad2c30eb Ignore type-constrained converter when auto-configuring Jackson converter
Previously, JacksonHttpMessageConvertersConfiguration would configure a
general-purpose MappingJackson2HttpMessageConverter only if there was
no existing MappingJackson2HttpMessageConverter in the application
context. This was problematic when a
TypeConstrainedMappingJackson2HttpMessageConverter bean was present.
Such a bean is only capable of performing conversion for a specific
type, and therefore is no substitute for a general purpose converter,
yet its presence was causing the auto-configuration of a general
purpose converters to be turned off. This would leave Spring MVC’s
default converter being used for application/json requests which would
not honour the user’s Jackson configuration.

This commit enhances @ConditionalOnMissingBean so that the annotation
can be used to specify one or more types that should be ignored when
searching for beans. This allows the
TypeConstrainedMappingJackson2HttpMessageConverter beans that are
published by Spring Data REST to be ignored such that the
general-purpose MappingJackson2HttpMessageConverter is still
auto-configured.

Fixes gh-2914
10 years ago
Dave Syer 8c3f80eb64 Use mock servlet container for welcome page tests
Fixes gh-3371
10 years ago
Phillip Webb b5c435f8c4 Polish Actuator MVC customization support
See gh-3345
10 years ago
Phillip Webb df3ced1a45 Merge branch '1.2.x' 10 years ago
Phillip Webb 8ec10c8425 Use buildView() to create MustacheView
Update MustacheViewResolver so that buildView() is called to create
the MustacheView. This sets fields such as `contentType` and allows us
to remove explicit setApplicationContext() and setServletContext()
calls.

Fixes gh-3265
10 years ago
Andy Wilkinson 5a1e66b3d6 Make GzipFilterAutoConfiguration conditional on HttpMethod
GzipFilterProperties uses HttpMethod so GzipFilterAutoConfiguration,
which uses GzipFilterProperties, needs to be conditional on HttpMethod
being on the classpath.

Closes gh-3362
10 years ago
Dave Syer 1e464da248 Refactor the Actuator MVC configuration to allow more customization
There is a new spring.factories entry for
org.springframework.boot.actuate.autoconfigure.EndpointWebMvcConfiguration
which loads extra beans into the MVC config for the Actuator.
If the management context is a child context all the beans go in the
child (except the Spring Security filter still). A big bonus is that
you can add WebConfigurerAdapters to configure static resources etc.
A new component called ManagementContextResolver can be used to
locate the ApplicationContext for the MVC endpoints.

Fixes gh-3345
10 years ago
Phillip Webb 8d948dfa6c Be more lenient about expected exceptions 10 years ago
Phillip Webb 5c6fef903d Polish 10 years ago
Phillip Webb 268b7911dd Rename ResourceProperties.Chain.html5AppCache
Rename the `html5AppCache` property from `ResourceProperties.Chain` to
`html-application-cache`.

Fixes gh-3354
10 years ago
Phillip Webb d213cc05d5 Polish 10 years ago
Andy Wilkinson cc3aea2b69 Prevent Jetty’s singleton shutdown thread from breaking restarts
By default, Jetty uses a singleton shutdown thread, registered as a
shutdown hook, to stop its components. This single thread breaks the
restart logic in devtools as a second restart causes a second attempt to
start the singleton shutdown thread which fails with an
IllegalStateException. This processing is unnecessary in a Spring Boot
application as the application context’s lifecycle when ensure that
Jetty is shutdown.

This commit updates the embedded Jetty container to remove its
components from Jetty’s shutdown thread. This leaves the thread with
no components to manage at which point it removes its registration as a
shutdown hook.

Closes gh-3343
10 years ago
Andy Wilkinson 00d594dcda Replace GzipFilter and Tomcat compression with general purpose approach
Closes gh-3296
10 years ago
Ivan Sopov dde194e2b9 Use native compression for all embedded containers, not just Tomcat
See gh-3296
10 years ago
Stephane Nicoll 31a6d53a95 Fix typo 10 years ago
Stephane Nicoll a6ccb4a6e0 Polish
Polish resource handling chain support. Make sure that the chain is
enabled automatically if at least one strategy is enabled.

See gh-1604
10 years ago
Brian Clozel dd561d15cf Improve Spring Resource Handling support
This commit improves support of the Resource Handling features
introduced in Spring Framework 4.1. Those features add new ways to
resolve and transform static resources in applications.
See [this blog
post](https://spring.io/blog/2014/07/24/spring-framework-4-1-handling-static-web-resources)
for more details.

The `ResourceUrlEncodinFilter` is added for compatible template engines:
Velocity and Thymeleaf. It assists them with rewriting the URLs of
static resources when rendering templates.

New keys are added in the `ResourceProperties` in order to configure
the Resource Handling chain. `ResourceResolvers` and
`ResourceTransformers` are registered accordingly in
`WebMvcAutoConfiguration`.

Here is an example of enabling a `ContentVersionStrategy` on all
static resources, meaning their names will be changed for cache
busting purposes by adding a content hash at the end of the file name.
Like "/js/jquery.js -> /js/jquery-872ca6a9fdda9e2c1516a84cff5c3bc6.js".

```
spring.resources.chain.enabled:true
spring.resources.chain.strategy.content.enabled:true
spring.resources.chain.strategy.content.paths:/**
```

Closes gh-1604
Closes gh-3123
10 years ago
Stephane Nicoll 43b9ea53d6 Polish (avoid dot at the end of the line) 10 years ago
Phillip Webb 4236a9336d Make FlywayMigrationStrategy an interface
Change FlywayMigrationStrategy from a class to an interface.

Fixes gh-3217
10 years ago
Stephane Nicoll 1d66aa35ed Fix typo 10 years ago
cohee016 d948ec5810 Add Freemarker `prefer-file-system-access` support
Add a `spring.freemarker.prefer-file-system-access` property and update
FreeMarkerAutoConfiguration to support it.

Fixes gh-2901
10 years ago
Phillip Webb 61fc4f3f12 Polish copyright headers 10 years ago
Stephane Nicoll d0698bd8ed Remove unnecessary System.out in tests 10 years ago
Andreas Ahlenstorf a08b09563b Add support for jOOQ
Add auto-configuration and a starter POM for jOOQ.

See gh-2804
10 years ago
Andy Wilkinson 24ef2e506b Merge branch '1.2.x' 10 years ago
Andy Wilkinson 8681a8ad2a Map empty virtual host to "/" when parsed from an address
Previously, an address that ended in a "/" would result in the virtual
host being an empty string. This was inconsistent with setVirtualHost
which would map an empty string to "/".

This commit updates the address parsing logic to call setVirtualHost
rather than assigning the value directly to this.virtualHost. This
ensures that the special handling for an empty string is applied
consistently.

Closes gh-3304
10 years ago
Andy Wilkinson d30dd1fa98 Merge branch '1.2.x' 10 years ago
Andy Wilkinson 01ba0f7571 Make RemoteIpValve's protocolHeaderHttpsValue configurable via the env
Closes gh-3289
10 years ago
Artur Konczak 2e66f17491 Enable non local node Elasticsearch instances
Update ElasticsearchAutoConfiguration to allow `http.enabled` and
`node.local` settings to be specified by ElasticsearchProperties.

Fixes gh-2805
Closes gh-2913
10 years ago
Eddú Meléndez 8859824efc Add Apache Artemis support
Add auto-configuration support for Apache Artemis which was formed when
HornetQ was donated to the Apache Foundation. The majority of this code
is based on the HornetQ auto-configuration.

Fixes gh-3154
Closes gh-3246
10 years ago
Phillip Webb e6d5d7c7ab Fix failing MongoDataAutoConfigurationTests 10 years ago
Phillip Webb 2f16a01dd5 Polish 10 years ago
izeye 436054053c Fix default MBeanServer bean name in doc
Closes gh-3283
10 years ago
Andy Wilkinson fd6d61e8b4 Add auto-configuration support for Spring Session
This commit adds support for automatically configuring Spring Session.
In a web application when both Spring Session and Spring Data Redis
are on the classpath, Spring Session's Redis Http Session support
will be auto-configured. The max inactive interval for Redis-backed
sessions can be configured via the environment using the existing
server.session-timeout property.

Closes gh-2318
10 years ago
Eddú Meléndez 58ca6cdc76 Add support for FieldNamingStrategy
Closes gh-3031
Closes gh-3069
10 years ago
Kamil Szymanski 008dee5dce Add JDBC url to Driver class name mappings for DB2, Teradata and Firebird
See gh-2843
10 years ago
dgomesbr 1ebbf8ac4d Upgrade to Hazelcast 3.5
Closes gh-3267
Closes gh-3272
10 years ago
Stephane Nicoll be5e30b409 Migrate spring.view properties
Migrate `spring.view.prefix` and `spring.view.suffix` to
`spring.mvc.view.prefix` and `spring.mvc.view.suffix` respectively. The
former properties are still handled in a backward compatible way and are
defined as deprecated in the meta-data.

Closes gh-3250
10 years ago
Phillip Webb c3b344fdc2 Polish 10 years ago
Stephane Nicoll b5d49b3099 Expose additional admin features
Improve SpringApplicationAdminMXBean to expose additional information:

* Whether the application uses an embedded container
* The properties exposed by the `Environment`

This allows to know if the application is web-based and the HTTP port
on which it is running.

Closes gh-3067
10 years ago
Stephane Nicoll cb98ee25ff Polish
See gh-2900
10 years ago
Eddú Meléndez 4883a5240a Remove deprecated SimpleMongoDbFactory call
Update MongoAutoConfiguration to create a `MongoClient` bean rather than
`Mongo` and update `MongoDataAutoConfiguration` to remove the call to
the deprecated `SimpleMongoDbFactory`.

Fixes gh-3105
Closes gh-3126
10 years ago
Phillip Webb 73d5a858c5 Polish 10 years ago
Sebastien Deleuze 78a7b6ed66 Add async request timeout property
Add a new `spring.mvc.async.request-timeout` property which can be used
to configure AsyncSupportConfigurer.setDefaultTimeout(..).

Fixes gh-2900
Closes gh-3236
10 years ago
Eddú Meléndez 6d5ff33bdf Fix typos
Closes gh-3247
10 years ago
Phillip Webb 93a7dc21da Merge branch '1.2.x' 10 years ago
Phillip Webb cca0b76ac8 Support Velocity toolbox configurations from jar
Create an EmbeddedVelocityToolboxView which supports loading toolbox.xml
files from the application classpath as well as the ServletContext. The
VelocityAutoConfiguration class has been updated to use the new view.

This change allows the `spring.velocity.toolbox-config-location`
property to work with embedded servlet containers.

Fixes gh-2912
10 years ago
Phillip Webb 49039c33ea Polish 10 years ago
Phillip Webb d87f2713af Merge branch '1.2.x' 10 years ago