Commit Graph

403 Commits

Author SHA1 Message Date
Dave Syer 538afc4ab1 Make some methods in BasicErrorController protected
Spring MVC requires all handlers for the same path to be on the same handler
so if anyone wants to add new handlers for different content types they
have to copy a lot of code from BasicErrorController. This change increases
the visibility of the basic utility methods in BasicErrorController so that
custom handlers can be added easily.

Fixes gh-3828
2015-08-26 17:27:35 +01:00
Andy Wilkinson 003268fb4e Add support for @WebFilter, @WebListener, @WebServlet
This commit adds a new annotation, @ServletComponentScan, that can be
used to enable scanning for @WebFilter, @WebListener, and @WebServlet
annotated classes. Registration beans will be automatically created for
any classes that are found, with the configuration derived from the
annotation.
2015-08-26 15:58:52 +01:00
Stephane Nicoll efd1f6094a Merge branch '1.2.x' 2015-08-25 15:22:24 +02:00
Stephane Nicoll 6393569d42 Polish Externalized Configuration section
Closes gh-3823
2015-08-25 15:22:02 +02:00
Stephane Nicoll 63d157bb7c Favor JSR-107 provider if present
Previously, native cache libraries were favored over a standard JSR-107
implementation. If a user has a working setup using JCache with one
provider and switch to another provider, his setup may be broken if we
happen to provide a native support for the new provider.

We now consistently favor JSR-107 if it is present. Native support can
still be enabled via the `spring.cache.type` property.

Closes gh-3822
2015-08-25 15:07:24 +02:00
Stephane Nicoll 7c0c953f81 Add value alias for SpringApplicationConfiguration
Given that Spring Boot uses java config accross the board, a new `value`
attribute is now aliased to the existing `classes` attribute such that
one could write the following:

@SpringApplicationConfiguration(MyConfig.class)
public class MyTest {}

Closes gh-3635
2015-08-19 17:09:34 +02:00
Josh Thornhill c13622ea29 Fix typo
Closes gh-3721
2015-08-15 17:55:53 +02:00
Stephane Nicoll 2d62e1fc89 Add a property to configure the connection pool
A new `spring.datasource.type` property can now be used to configure the
connection pool implementation to use (rather than only relying on Boot's
preferences).

Closes gh-3705
2015-08-14 13:30:14 +02:00
Stephane Nicoll e4b81b173c Polish 2015-08-14 13:21:15 +02:00
Stephane Nicoll 960d6eadba Spring Boot starter section
Improve the documentation to explain the necessary steps to create a
custom Spring Boot starter. In particular, provide more details regarding
naming conventions.

Closes gh-2537
See gh-2927
2015-08-14 10:51:38 +02:00
Andy Wilkinson 51dd806a98 Detect ConfigurableWebBindingInitializer bean and register with MVC
Previously, to use a custom ConfigurableWebBindingInitializer, it was
necessary to extend WebMvcConfigurationSupport and override
getConfigurableWebBindingInitializer. This had the unwanted
side-effect of switching off the auto-configuration of Spring MVC.

This commit updates the auto-configuration to look for a
ConfigurableWebBindingInitializer bean and register it with Spring
MVC.

Closes gh-2526
2015-08-13 15:20:59 +01:00
izeye eab7eff047 Polish documentation
Closes gh-3738
2015-08-13 12:58:53 +01:00
Dave Syer 68af0a73ec Clarify documentation in a few areas
Fixes gh-3527
2015-08-10 11:50:48 +01:00
Stephane Nicoll bae3dcba33 Polish error pages documentation
Make it more clear that the `ErrorPage` path requires an URL mapping to
be registered.

Closes gh-3698
2015-08-07 10:05:02 +02:00
Andy Wilkinson 1a11ed20ba Provide a property to configure conversion word used to log exceptions
This commit adds a new property, logging.exception-conversion-word,
that can be used to configure the conversion word that is used when
logging exceptions. The default value, %rEx, will log exceptions
with the root cause first and include class packaging information in
the stack trace. The new property is supported when using either
Logback or Log4J2.

Closes gh-3684
2015-08-06 11:37:54 +01:00
Stephane Nicoll 89c3d2ea12 Improve MongoDB documentation
Explicitly mention that `spring.data.mongodb.uri` can be used to
customize additional settings such as replica set.

Closes gh-2624
2015-08-05 15:06:12 +02:00
Andy Wilkinson 2a5a32b603 Add auto-configuration for H2’s web console
Three conditions must be met for the console to be enabled:

 - H2 is on the classpath
 - The application is a web application
 - spring.h2.console.enabled is set to true

If spring-boot-devtools is on the classpath, spring.h2.console.enabled
will be set to true automatically. Without the dev tools, the enabled
property will have to be set to true in application.properties.

By default, the console is available at /h2-console. This can be
configured via the spring.h2.console.path property. The value of this
property must begin with a '/'.

When Spring Security is on the classpath the console will be secured
based on the user's security.* configuration. When the console is
secured, CSRF protection is disabled and frame options is set to
SAMEORIGIN for its path. Both settings are required in order for the
console to function.

Closes gh-766
2015-08-05 10:54:03 +01:00
Stephane Nicoll bfe930a873 Auto-configure @EnableConfigurationProperties
Add an auto-configuration that avoid a Spring Boot user to add
`@EnableConfigurationProperties` to its configuration to benefit from
that feature.

As our own auto-configurations are tested independently, such annotation
is still present to avoid a useless reference to this new
auto-configuration.

Closes gh-2457
2015-08-04 13:59:57 +02:00
Phillip Webb 891dd5a0f6 Polish 2015-08-03 11:03:48 -07:00
izeye ee6fc8d917 Fix typos
Closes gh-3608
2015-07-28 08:54:47 +02:00
Stephane Nicoll 34891c27de Polish
Closes gh-3566
2015-07-23 11:53:52 +02:00
drumonii fbf6574b51 Document validation of nested components
See gh-3566
2015-07-23 11:53:06 +02:00
Lucas Saldanha bf303b02f7 Add configuration properties validation sample
Create a new project sample that demonstrate the usage of
@ConfigurationProperties with configurationPropertiesValidator.

Fixes gh-3513
2015-07-23 11:42:55 +02:00
izeye 31d8a647d0 Fix typos
Closes gh-3531
2015-07-17 09:08:47 +02:00
Phillip Webb 08d1f6daf5 Allow persistent servlet sessions across restarts
Update Tomcat, Jetty and Undertow to serialize session data when the
application is stopped and load it again when the application restarts.

Persistent session are opt-in; either by setting `persistentSession`
on the ConfigurableEmbeddedServletContainer or by using the property
`server.session.persistent=true`.

Fixes gh-2490
2015-07-16 17:29:20 -07:00
Sebastien Deleuze 4405ae4eaf Add CORS documentation
Closes gh-3052
2015-07-16 17:41:54 +01:00
Andy Wilkinson 9f9f21207f Document support for comma-separated list of names in <springProfile>
See gh-3493
2015-07-16 17:34:11 +01:00
Andy Wilkinson f9ab189262 Correct the link to Embedded Mongo in the reference documentation 2015-07-16 17:04:14 +01:00
Stephane Nicoll d9939a5be2 Map FATAL level for Log4j
Make sure that Boot's FATAL level is mapped to log4j and log4j2 properly.

Fixes gh-3518
2015-07-16 17:59:04 +02:00
Andy Wilkinson 2c81907d58 Flesh out and polish Embedded MongoDB auto-configuration contribution
Embedded MongoDB is now auto-configured when it is on the classpath.
The Mongo instance will listen on the port specified by the
spring.data.mongodb.port property. If this property has a value of
zero and randomly allocated port will be used. In such an event, the
MongoClient created by MongoAutoConfiguration will be automatically
configured to use the port that was allocated.

By default, MongoDB 2.6.10 will be used. This can be configured using
the spring.embedded-mongodb.version property. Mongo's sync delay
feature is enabled by default. This can be configured using the
spring.embedded-mongobd.features property.

Closes gh-2002
2015-07-16 16:34:18 +01:00
izeye f4589e7cc3 Fix typos
Closes gh-3504
2015-07-15 15:45:02 +02:00
Melvin Kicchi 3d83c6fcb2 Fix typo in jOOQ example code
Closes gh-3461
2015-07-10 13:54:00 -07:00
Phillip Webb eeb947b382 Polish docs 2015-07-09 12:56:03 -07:00
Phillip Webb 582239b03b Add ApplicationArguments and ApplicationRunner
Add ApplicationArguments interface which allows SpringApplication.run
arguments to be injected into any bean. The interface provides access
to both the raw String[] arguments and also provides some convenience
methods to access the parsed 'option' and 'non-option' arguments.

A new ApplicationRunner interface has also been added which is
similar to the existing CommandLineRunner.

Fixes gh-1990
2015-07-08 23:27:13 -07:00
Stephane Nicoll a073a505ae Move spring.oauth2.* to security.oauth2.*
Unfortunately, we have no other choice to flip the ignoreUnknownFields
attribute of `SecurityProperties` has many different target are now set
for that namespace outside the class. See gh-3445 for a potential way
to improve that.

Closes gh-3327
2015-07-08 18:26:25 +02:00
Phillip Webb e885dab752 Polish 2015-07-07 15:17:03 -07:00
Stephane Nicoll 406d4ea771 Polish 2015-07-07 17:19:00 +02:00
Stephane Nicoll 4602558a73 Polish AMQP doc
Closes gh-3431
2015-07-07 17:14:20 +02:00
Lucas Saldanha 0ce7be4413 Add AMQP section to the documetation
Closes gh-3348
2015-07-07 16:31:20 +02:00
Marten Deinum a3e62676af Extend TemplateViewResolverProperties for Groovy
Use AbstractTemplateViewResolverProperties as the base class for
GroovyTemplateProperties since the Spring GroovyMarkupViewResolver is
an AbstractTemplateViewResolver.

The auto-configuration for Groovy is now more aligned with the existing
Freemarker and Velocity auto-configuration, with a `resourceLoaderPath`
property being used instead of `prefix`.

Fixes gh-3365
Closes gh-3374
2015-07-06 14:45:28 -07:00
Stephane Nicoll 0eada5df86 Merge branch '1.2.x' 2015-07-06 14:01:56 +02:00
Stephane Nicoll 2126c7774a Add a note about transactional listeners
Clarify how the default JMS listener container factory is created if none
exists with regards to transactions.

Issue: SPR-3407
2015-07-06 11:03:44 +02:00
Phillip Webb 35379f627a Polish 2015-07-05 22:34:36 -07:00
Dave Syer eb49f4bfec Documentation for default profiles 2015-07-03 15:52:37 +01:00
Phillip Webb b5c435f8c4 Polish Actuator MVC customization support
See gh-3345
2015-06-30 22:09:38 -07:00
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
2015-06-30 09:42:58 +01:00
Phillip Webb d213cc05d5 Polish 2015-06-29 16:48:59 -07:00
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
2015-06-28 06:32:07 -07:00
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
2015-06-28 06:32:07 -07:00
Phillip Webb 4f072f4046 Update logging documentation
Update logging documentation to show the new `-spring` convention and
the Logback extensions.

See gh-1788
See gh-2558
See gh-3338
2015-06-26 15:59:08 -07:00
Phillip Webb 855e5a8e5f Minor doc polish 2015-06-24 20:42:16 -07:00
Geoffrey Chandler d6200389eb Add support for ANSI colored resource banners
Add AnsiPropertySource which allows named ANSI codes to be resolved
and update ResourceBanner to include it.

This commit also deprecates constants defined in AnsiElement and
replaces them with AnsiStyle, AnsiColor and AnsiBackground enums.

Closes gh-2704
2015-06-23 14:31:49 -07:00
Dave Syer 92a6e3188b Correct Spring Data REST docs 2015-06-23 09:41:28 +01:00
Phillip Webb 7fd07b6588 Document jOOQ support
Closes gh-2804
2015-06-22 21:20:12 -07:00
Stephane Nicoll 347cbb1ca4 Merge branch '1.2.x' 2015-06-22 10:44:37 +02:00
Stephane Nicoll 5f2ffdb9e2 Update SnakeYAML link
Closes gh-3302
2015-06-22 10:44:23 +02:00
Phillip Webb 3e4bbf05cd Document Apache Artemis support
See gh-3154
2015-06-18 21:00:34 -07:00
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
2015-06-18 14:52:59 +01:00
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
2015-06-17 11:52:18 +02:00
Andy Wilkinson eab599bd38 Merge branch '1.2.x' 2015-06-15 14:25:41 +01:00
Andy Wilkinson 0253f21f2f Update the link to Bitronix's documentation
Closes gh-3207
2015-06-15 14:25:24 +01:00
Stephane Nicoll bb4c89592d Merge branch '1.2.x' 2015-06-14 09:36:25 +02:00
Stephane Nicoll 01ba732a73 Consistent use of "=" for property key
Closes gh-3218
2015-06-14 09:36:10 +02:00
Phillip Webb ad7ed1dbae Formatting 2015-06-10 11:26:39 -07:00
Stephane Nicoll c1dea3797a Add documentation for SpringApplicationAdminMXBean
Closes gh-3179
2015-06-10 13:46:37 +02:00
Stephane Nicoll 8c8fce5b0f Merge branch '1.2.x'
Conflicts:
	spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
2015-06-08 15:18:45 +02:00
Stephane Nicoll e16f5d03ab Add reference to Mustache to documentation
Closes gh-3121
2015-06-08 15:16:01 +02:00
John Tims 07a688968d Fix typo
Closes gh-3140
2015-06-06 13:36:15 +02:00
Phillip Webb 98b6fafe92 Fix broken docbook 2015-06-05 16:31:41 -07:00
Phillip Webb c7677d10ca Polish documentation 2015-06-05 15:58:14 -07:00
ceilfors 5fb67af25f Remove spock caveat that was fixed in 1.0
Closes gh-3072
2015-06-04 14:51:14 +02:00
Phillip Webb 312471f996 Polish documentation 2015-06-04 01:09:59 -07:00
Stephane Nicoll fca192fa41 Add spring-boot-starter-cache
Closes gh-3098
2015-06-03 17:29:57 +02:00
Josh Thornhill 10f7031e46 Fix typo in documentation
Closes gh-3077
2015-06-02 11:50:49 +02:00
Stephane Nicoll fbfdbce266 Add cache documentation
See gh-2633
2015-06-02 11:25:24 +02:00
Josh Thornhill f721862d6f Fix typo in documentation
Closes gh-3077
2015-06-02 09:34:54 +02:00
Stephane Nicoll fc067d1b75 Merge branch '1.2.x' 2015-05-28 15:30:27 +02:00
Phil Parker eb92dfbb3b Fix link to Groovy documentation
Closes gh-3054
2015-05-28 15:28:48 +02:00
Stephane Nicoll f0b203f6da Update doc for schema creation
See gh-446
2015-05-28 09:45:06 +02:00
Stephane Nicoll 97cf86801b Fix example structure 2015-05-27 11:10:14 +02:00
Dave Syer c5dc3f564b Add @EnableOAuth2Sso and spring.oauth2.sso.*
User can enable OAuth2 SSO by declaring the intent (@EnableOAuth2Sso)
and also configuring the client properties (spring.oauth2.client.*).
The spring.oauth2.sso.* are only needed to change the path for the
login (defaults to /login) - any other security configuration for the
protected resources can be added in a WebSecurityConfigurerAdapter
which carries the @EnableOAuth2Sso annotation.
2015-05-26 07:23:26 +01:00
Dave Syer af320b49bf Rationalize some features and merge in customizers from Spring Cloud 2015-05-26 06:34:43 +01:00
Phillip Webb e1152b4db8 Merge branch '1.2.x' 2015-04-13 11:41:03 -07:00
Phillip Webb dd19dd70c5 Update relaxed binding documentation sample
Include getters and setters with the sample class.

Fixes gh-2813
2015-04-13 11:38:42 -07:00
Phillip Webb 5d9efe40d0 Merge branch '1.2.x' 2015-03-30 17:01:08 -07:00
Phillip Webb 495a79c324 Document logging properties with @PropertySource
Add a note to the logging documentation to point out a potential gotcha.

Fixes gh-2709
2015-03-30 16:59:33 -07:00
Andy Wilkinson dd35718608 Merge branch '1.2.x' 2015-03-17 11:28:03 +00:00
Andy Wilkinson b82e220008 Polish spring-boot-features
Wrap at 90 chars more consistently
2015-03-17 11:26:44 +00:00
izeye a4be4670c3 Polish the documentation
Closes gh-2570
2015-03-17 11:00:31 +00:00
Stephane Nicoll 7b2b11903a Add ApplicationReadyEvent
Add an event that indicates the Spring Application has fully started and
is now ready to service requests. While ContextRefreshEvent provides
such hook for a regular spring application, this dedicated event is
triggered once all callbacks have been processed and right before the
context is returned to the caller. Besides, such event is triggered once
per application, regardless of the number of (child) contexts that could
have been created.

Closes gh-2638
2015-03-12 09:23:29 +01:00
Phillip Webb ee1cab7f5b Improve LevelRemappingAppender documentation
Fixes gh-2443
2015-02-25 14:07:14 -08:00
izeye 1493da1e03 Improve documentation
Closes gh-2553
2015-02-25 11:32:58 -08:00
Phillip Webb 56e31a8c6b Polish 2015-02-23 19:21:37 -08:00
Dave Syer c3c156515f Add extra detail on servlet listeners
Fixes gh-2518
2015-02-18 10:40:47 +00:00
Andy Wilkinson b8babd4eb4 Polish documentation on @ConfigurationProperties getters and setters
- Correct typo (coercable -> coercible)
 - Update description to reflect that Spring 4.1.5 supports the
   expansion of array properties and and a test that verifies the
   behaviour
2015-02-17 11:25:50 +00:00
Dave Syer 5efdb85876 Enhance note about Java Bean getters and setters 2015-02-13 13:11:12 +00:00
Dave Syer e541e139a2 Add note about Java Bean getters and setters
Apparently some users are unclear that setters and getters are
mandatory for @ConfigurationProperties. This should clear it up.
2015-02-13 09:17:28 +00:00
Phillip Webb 636898f9ad Polish 2015-02-09 11:39:48 -08:00
Andy Wilkinson 17f05467bc Document IDEA’s quirky classpath ordering and its effect on templates
Closes gh-2319
2015-02-04 11:35:21 +00:00
Andy Wilkinson e489ab9b29 Update docs to clarify ordering for profile-specific properties
Closes gh-2404
2015-02-03 14:12:04 +00:00
Andy Wilkinson 93d533dfa6 Document auto-configuration support for Spring HATEOAS
Closes gh-2426
2015-02-02 16:53:52 +00:00
Phillip Webb 88f824845d Clarify documentation of relaxed binding
Update the "Relaxed binding" with a small table of common relaxed
property names and when they might be used.

Fixes gh-2234
2015-01-07 22:26:01 -08:00
Phillip Webb b6cb629974 Document the logger category used to show password
Fixes gh-2146
2015-01-07 14:48:34 -08:00
Phillip Webb be30385e15 Add @WebIntegrationTest annotation
Add `@WebIntegrationTest` which is similar to `@IntegrationTest` and
`@WebAppConfiguration`. The annotation using Spring's `@BootstrapWith`
annotation rather than `@TestExecutionListeners` which allows it to
work when `@TestExecutionListeners` (even ServletTestExecutionListener)
are declared on the test class.

This annotation is particularly useful for TestNG users that extend
Spring's `AbstractTestNGSpringContextTests` class.

Fixes gh-2299
See gh-1956
See gh-2135
2015-01-06 21:03:48 -08:00
Phillip Webb 6ddabb871a Merge branch '1.1.x' 2015-01-05 11:57:38 -08:00
Phillip Webb 0622b3e987 Fix documentation code example error
The "Customizing ConfigurableEmbeddedServletContainer directly"
section should use `HttpStatus.NOT_FOUND` and not `HttpStatus.404` in
the sample code.

Fixes gh-2258
2015-01-05 11:57:02 -08:00
Phillip Webb 6ece075aec Merge branch '1.1.x' 2014-12-28 12:19:30 -08:00
Phillip Webb a0667ba4bb Polish docs 2014-12-28 12:10:44 -08:00
Stephane Nicoll 2bf01ebeca Merge branch '1.1.x' 2014-12-27 18:28:50 +01:00
Stephane Nicoll 05e402295d Mention environment variables mapping in the guide
Closes gh-2234
2014-12-27 18:28:13 +01:00
Phillip Webb f35135e43d Polish documentation 2014-12-17 11:33:28 -08:00
Stephane Nicoll 1b039e78e6 Documentation improvement of DataSource configuration
Closes gh-2126
2014-12-17 14:25:33 +01:00
Stephane Nicoll fe5800f8be Fix typo 2014-12-16 14:55:15 +01:00
Phillip Webb 6b4bb4d654 Unify console and file logback patterns
Update the file log pattern to write the thread name after the `---`
separator. The allows both file and console logs to be parsed in the
same way.

Fixes gh-2136
2014-12-12 19:05:37 -08:00
Phillip Webb fc2e616cc2 Restore Spring Boot 1.1 logging behavior
Refactor LoggingApplicationListener and LoggingSystem to restore
Spring Boot 1.1 logging behavior. The LOG_FILE and LOG_PATH system
properties are now set before configuring the logger.

The `logging.path` property is now once again optional and will not be
used when `logging.file` is specified. The documentation has also been
updated to reflect the changes.

Fixes gh-2121
Fixes gh-2117
2014-12-12 18:40:37 -08:00
Phillip Webb e772174019 Update reference documentation for Spring Boot 1.2
Various updates and polish to prepare the reference documentation for
Spring Boot 1.2.

Fixes gh-1903
2014-12-10 00:56:41 -08:00
Phillip Webb 71fd3b36b4 Update "logging" reference documentation
Update the logging section to reflect changes in Spring Boot 1.2

Fixes gh-1790
2014-12-10 00:50:37 -08:00
Phillip Webb 400b664098 Update "banner" reference documentation
Fixes gh-2103
2014-12-10 00:48:29 -08:00
Stephane Nicoll 8ee237a9c6 Fix documentation syntax typo 2014-11-26 18:14:28 +01:00
Andy Wilkinson 023d5bea3b Merge branch '1.1.x' 2014-11-25 10:51:44 +00:00
Andy Wilkinson feddb2e8a1 Note that @IntegrationTest and @WebAppConfiguration can be used with Spock
Closes gh-1908
2014-11-25 10:51:27 +00:00
Phillip Webb c34cfb27a3 Polish 2014-11-19 10:52:26 -08:00
Dave Syer 7fa0ea7c3b Add support for spring.jersey.type=filter
Fixes gh-1756
2014-11-19 16:51:55 +00:00
Andy Wilkinson 90af8bf54a Add auto-configuration for Jetty 9's WebSocket support
Closes gh-1269
2014-11-19 14:44:54 +00:00
Andy Wilkinson 1864d79077 Polish Undertow contribution
Closes gh-1779
2014-11-18 21:20:34 +00:00
Phillip Webb 3c6c1d08e0 Polish 2014-11-17 09:37:56 -08:00
Stephane Nicoll 8112aca9e8 Add documentation for email integration
Closes gh-1904
2014-11-17 14:43:46 +01:00
Andy Wilkinson d2c50813fd Merge branch '1.1.x' 2014-11-10 09:42:32 +00:00
Andy Wilkinson 595f387fb2 Correct the references to WebSecurityConfigurerAdapter in the docs
Closes gh-1861
2014-11-10 09:41:18 +00:00
Phillip Webb 68571ee535 Document @SpringBootApplication
Add a section to the reference guide about @SpringBootApplication.

See gh-1842
2014-11-06 22:50:25 -08:00
Phillip Webb edaed415fb Polish 2014-11-04 09:09:26 -08:00
Stephane Nicoll 9dec27e7bf Permit to disable JTA using a single property
Disable JTA auto-configuration altogether with a simple property. This
can be useful if the environment is JTA capable but the application does
not require it.

Fixes gh-1457
2014-11-04 16:53:54 +01:00
Stephane Nicoll cbd3c39640 Override StringHttpMessageConverter with UTF-8
Override the default StringHttpMessageConverter provided by the standard
Spring MVC configuration so that is uses UTF-8 instead of the aging
default of the servlet spec (that is ISO-8859-1)

Fixes gh-1800
2014-11-04 13:12:19 +01:00
Andy Wilkinson bd562c06b6 Merge branch '1.1.x' 2014-10-28 11:06:23 +00:00
Andy Wilkinson f58b8366e1 Correct the syntax that's used for smart single and double quotes
Fixes gh-1753
2014-10-28 11:03:35 +00:00
Phillip Webb 2e7aa4685b Polish 2014-10-21 20:34:00 -07:00
Andy Wilkinson 01fd8cb8f3 Reinstate Bitronix's default server ID, provide property to override it
Previously, Bitronix's server ID was hard-coded to be
spring-boot-jta-bitronix. This created the possibility of multiple
transaction managers performing recovery on each other's behalf as
they would be unable to identify their own XIDs due to the common
server ID.

This commit reinstates the default (which is the IP address of the
machine on which Bitronix is running), and introduces a new
property, spring.jta.transaction-manager-id, that can be used to
configure the id for both Atomikos and Bitronix. A cautionary note
has also been added to the documentation for Atomikos and Bitronix
explaining the need to configure this property.

Closes gh-1548
2014-10-16 09:44:42 +01:00
Andy Wilkinson 2da4dc00f0 Merge branch '1.1.x' 2014-10-13 15:36:14 +01:00
Andy Wilkinson 7060cc1967 Correct the position of JNDI in the ordered list of property sources
Fixes gh-1693
2014-10-13 15:35:06 +01:00
Andy Wilkinson 7211571969 Fix some grammar issues in docs
Closes gh-1695
2014-10-13 13:18:24 +01:00
Eric Dahl 16937746a0 Fix some grammar issues in docs 2014-10-13 12:22:14 +01:00
Phillip Webb 187b4e706c Escape `...*...` outputs using `+...*...+` 2014-10-09 13:04:35 -07:00
Phillip Webb 6281070d0a Merge branch '1.1.x'
Conflicts:
	spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
2014-10-09 13:00:27 -07:00
Phillip Webb 7e842aee77 Escape `...*...` outputs using `+...*...+` 2014-10-09 12:41:39 -07:00
Dave Syer 8ffe7ec4b8 Fix asciidoctor syntax problems and updgrade to asciidoctor 1.5
Points to note for authors:

* Nesting "*" in `literals` does not behave like Markdown - you have to
escape the asterisk (e.g. `foo/\*`)

* Quote ligatures (why we had to use those I don't really know) are
different in asciidoctor 1.5 ('`foo`' instead of ``foo'')

Merge branch '1.1.x'

Conflicts:
	spring-boot-docs/src/main/asciidoc/production-ready-features.adoc
	spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
2014-10-09 10:58:06 +01:00
Dave Syer 6a503d5ca9 Fix loads of asciidoc errors 2014-10-09 10:51:25 +01:00
Phillip Webb 62eb01f0b8 Polish 2014-10-06 12:03:51 -07:00
Sebastien Deleuze 315213ea4e Support Jackson based XML serialization and Jackson2ObjectMapperBuilder
This commit introduces support for Jackson based XML serialization, using the
new MappingJackson2XmlHttpMessageConverter provided by Spring Framework
4.1. It is automatically activated when Jackson XML extension is detected on the
classpath.

Jackson2ObjectMapperBuilder is now used to create ObjectMapper and XmlMapper
instances with the following customized properties:
 - MapperFeature.DEFAULT_VIEW_INCLUSION is disabled
 - DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES is disabled

JodaModuleAutoConfiguration and Jsr310ModuleAutoConfiguration have been removed
since their behaviors are now handled directly by the ObjectMapper builder.

In addition to the existing @Bean of type ObjectMapper support, it is now
possible to customize Jackson based serialization properties by declaring
a @Bean of type Jackson2ObjectMapperBuilder.

Fixes gh-1237
Fixes gh-1580
Fixes gh-1644
2014-10-06 10:54:38 +01:00
Eric Dahl bbf3076d9d Fix some grammar issues in docs 2014-10-02 20:45:05 -07:00
Dave Syer 64ef03aafd Fix Jersey1 integration test 2014-10-02 15:28:27 +01:00
Dave Syer 104d625785 Merge branch '1.1.x' 2014-10-01 15:36:22 +01:00
Dave Syer 034362b6e5 Explicit example for spring.jpa.properties.hibernate.*
Fixes gh-1636
2014-10-01 15:35:52 +01:00
Andy Wilkinson 0c63406b49 Merge branch '1.1.x' 2014-09-25 19:06:37 +01:00
Andy Wilkinson 72ef1d6554 Update ErrorPageFilter so it won’t try to forward a committed response
In some scenarios, the ErrorPageFilter will want to forward the request
to an error page but the response has already been committed. One common
cause of this is when the filter’s running on WAS. WAS calls
flushBuffer() (which commits the response), upon a clean exit from a
servlet’s service method.

Previously, the filter would attempt the forward, even if the response
was committed. This would result in an IllegalStateException and a
possibly incomplete response that may also have an incorrect status
code.

This commit updates the ErrorPageFilter to check to see if the response
has already been committed before it attempts to forward the request to
the error page. If the response has already been committed, the filter
logs an error and allows the container’s normal handling to kick in.
This prevents an IllegalStateException from being thrown.

This commit also updates the response wrapper to keep track of when
sendError has been called. Now, when flushBuffer is called, if
sendError has been called, the wrapper calls sendError on the wrapped
response. This prevents the wrapper from suppressing an error when the
response is committed before the request handling returns to the error
page filter.

Closes gh-1575
2014-09-25 19:05:59 +01:00
Phillip Webb 55a84c7bd7 Merge branch '1.1.x' 2014-09-24 14:12:02 -07:00
Phillip Webb 142216400a Polish formatting 2014-09-24 12:04:40 -07:00
Dave Syer 97dcd24668 Merge branch '1.1.x' 2014-09-22 12:16:21 +01:00
Dave Syer a63d0b4e16 Update docs with DispatcherType.ERROR for filters
Some frameworks handle all requests in a Filter, so you have to
explicitly register it as an ERROR dispatcher.

See gh-1272
2014-09-22 12:15:02 +01:00
Phillip Webb 565e449d89 Merge branch '1.1.x'
Conflicts:
	spring-boot-docs/src/main/asciidoc/howto.adoc
2014-09-15 11:37:50 -07:00
Phillip Webb 5ba86a103d Polish 2014-09-15 11:35:16 -07:00
Stephane Nicoll 037e3a4221 Fix typo in documentation
Fixes gh-1527
2014-09-12 12:22:23 -05:00
Andy Wilkinson dde7ebf30f Merge branch '1.1.x' 2014-09-07 15:45:53 -05:00
John Tims a4e08beebc Add missing variable to the example in the Loading YAML section
Closes gh-1524
2014-09-07 15:43:22 -05:00
David Liu 8e9e502b6a Add support for auto-configuration of Commons DBCP2
Closes gh-1292
Closes gh-1477
2014-09-07 10:43:48 -05:00
Andy Wilkinson ad8be26efd Merge branch '1.1.x' 2014-09-04 17:04:43 +01:00
Andy Wilkinson 990213b8b8 Correct reference to ConfigurableEmbeddedServletContainerFactory
Closes gh-1500
2014-09-04 17:04:38 +01:00
Phillip Webb f7cffce695 Allow custom JNDI ConnectionFactory lookup
Add a `spring.jms.jndi-name` property to allow a JMS ConnectionFactory
to be obtained from a custom JNDI location.

Fixes gh-1471
2014-09-03 18:35:45 -07:00
Phillip Webb 6f62fc854b Merge branch '1.1.x' 2014-09-03 11:45:54 -07:00
Phillip Webb 449752c9e2 Minor asciidoctor formatting 2014-09-03 08:38:31 -07:00
Stephane Nicoll 383288f1c2 Merge branch '1.1.x' 2014-09-03 16:32:24 +02:00
Stephane Nicoll 811f5ab80c Clarify the use of spring.profiles
Fixes gh-1470
2014-09-03 16:30:55 +02:00
Phillip Webb 236026a43a Support mixed XA/non-XA ConnectionFactory beans
Update ActiveMQ and HornetQ XA configurations to also expose non-xa
ConnectionFactory variants.

Fixes gh-1461
2014-09-02 13:00:59 -07:00
Phillip Webb f8a4df0838 Polish 2014-08-28 12:07:44 -07:00
Stephane Nicoll aa0f90ec2e Document JMS auto configuration
Fixes gh-1445
2014-08-28 09:52:46 +02:00
Phillip Webb ff870de0f0 Fix a few JTA issues
- Search for ConnectionFactories in java:/JmsXA and
  java:/XAConnectionFactory
- Remove javax.transaction:jta managed dependency
- Removed unused JtaProperties argument

Fixes gh-947
2014-08-27 10:09:34 -07:00
Phillip Webb 40d8dde202 Document distributed transaction support
See gh-947
2014-08-26 22:34:16 -07:00
Phillip Webb a4925dabf7 Add property for JNDI DataSource lookup
Add `spring.datasource.jndi-name` property to allow a DataSource to be
looked up from JNDI as an alternative to defining a URL connection.

Fixes gh-989
2014-08-26 11:44:38 -07:00
Phillip Webb 8656402ca6 Polish database docs section 2014-08-26 11:44:37 -07:00
Dave Syer 9da556d5e9 Merge branch '1.1.x' 2014-08-25 16:59:46 +01:00
Dave Syer 00ef26599e Add clarification of logging.file (fixes gh-1416) 2014-08-25 16:59:12 +01:00
Raphael von der Grün a35a79e1a3 Allow ANSI output to be configured by properties
Add AnsiOutputApplicationListener which configures AnsiOutput.enabled
based on a `spring.output.ansi.enabled` property.

Fixes gh-1243
2014-08-14 23:01:38 -07:00
Phillip Webb f8bf0e2031 Polish 2014-07-28 15:40:40 -07:00
Andy Wilkinson 672d713f99 Add dependency management for spock-spring and document its use
Closes #1234
2014-07-15 14:36:56 +01:00
Phillip Webb fd3e5eceeb Polish 2014-07-08 01:05:56 -07:00
Andy Wilkinson 148e32d09a Document need to use @ContextConfiguration with Spock
Closes #1167
2014-07-07 13:41:13 +01:00
Phillip Webb 60e60227ad Polish doc formatting 2014-07-02 15:52:46 -07:00
Dave Syer fd757cb371 Add logging.level to application.properties
E.g.

logging.level.org.springframework: DEBUG
logging.level.org.hibernate: WARN

Fixed gh-788
2014-06-27 15:49:17 +01:00
Iván López 009ae8822b Fix typo in documentation 2014-06-27 12:57:39 +02:00
Phillip Webb 378d38e2e5 Polish doc formatting 2014-06-20 10:29:04 -07:00
Dave Syer c04deec6ee Move JMS docs under 'Messaging' 2014-06-19 17:42:04 +01:00
Phillip Webb 9a5d828f52 Polish docbook formatting 2014-06-09 16:34:54 -07:00
Phillip Webb f619102cd9 Fix broken links in reference docs 2014-06-09 16:20:12 -07:00
Phillip Webb 30f57bab23 Fix broken links in reference docs 2014-06-09 15:35:53 -07:00
Dave Syer b75578d99c Adjust order of property sources
@PropertySources *can* and should be added in the slot
after the application.properties (code that is part of the
application should have lower precedence than external
configuration).

Fixes gh-1044
2014-06-07 11:10:51 +01:00
Phillip Webb 62d2b4136a Polish documentation
Apply consistent styling and edit a few section for clarity.
2014-06-06 22:56:44 -07:00
Andy Wilkinson f1b7544672 Fix duplicate id in the docs 2014-06-06 19:55:39 +01:00
Dave Syer 09200361de Align expectations of various JMX configurations
They all want to create an MBeanServer and when that happens
user sees no MBeans, or sometimes just one set (Spring Core,
Spring Integration or Spring Boot). To harmonise them we
create a @Bean of type MBeanServer and link to it in the
other autoconfigs

Fixes gh-1046
2014-06-06 17:52:14 +01:00
Andy Wilkinson fbc1d3eec0 Fix section title depth in JMS docs 2014-06-05 16:10:35 +01:00
Stephane Nicoll 726991c144 Use an embed HornetQ broker by default
This commit changes the default behavior of the HornetQ auto
configuration. Prior to this commit, an embedded broker was only
started when it was requested explicitly by a configuration option.

This is inconsistent with the ActiveMQ support and boot favors the
easiest route. If the necessary classes are available, HornetQ is
embedded in the application by default.

Fixes gh-1029
2014-06-04 20:15:55 +02:00
Stephane Nicoll 9ad7a22ebe Add documentation for JMS support
This commit documents Boot's JMS support, in particular how Boot
can auto-configure the ConnectionFactory for ActiveMQ and
HornetQ.

Fixes gh-1026
2014-06-04 16:26:35 +02:00