Commit Graph

422 Commits

Author SHA1 Message Date
Stephane Nicoll 3363415712 Polish documentation
Add a reference ot underscore notation

Closes gh-5268
2016-03-29 10:56:46 +02:00
Johnny Lim 51bbe5e37a Polish
Closes gh-5508
2016-03-28 11:47:02 +02:00
Phillip Webb c68e5f12ff Formatting 2016-03-25 12:46:52 -07:00
Stephane Nicoll fd437797b6 Polish contribution
This commit polihes the original Neo4j contribution in several areas.

Rather than providing the packages to scan, this commit rearranges the
`EntityScan` and `EntityScanRegistrar` so that the logic can be shared
for other components. If no package is provided, scanning now defaults to
the "auto-configured" package(s) and a `@NodeEntityScan` annotation
allows to override that.

The configuration has also been updated to detect the driver based on the
`uri` property. If the embedded driver is available we use that by
default. If it is not available, we're trying to connect to a Neo4j
server running on localhost. It is possible to disable the embedded mode
or set the `uri` parameter explicitly to deviate from these defaults.

The sample no longer relies on the embedded driver for licensing reason:
rather it expects an instance running on localhost (like other
data-related samples) and gracefully ignore any connection error. A
README has been added in the sample to further explain the available
options;

Closes gh-5458
2016-03-25 11:39:49 +01:00
Michael Hunger 0658cc8aee Add Neo4j support
See gh-5458
2016-03-25 11:26:57 +01:00
Stephane Nicoll e8766f21a5 Fix typo 2016-03-24 14:52:10 +01:00
Phillip Webb 88f3fa4f78 Document test improvements in 1.4
Closes gh-4901
2016-03-23 22:22:23 -07:00
Phillip Webb 7942d9f787 Polish 2016-03-21 22:52:25 -07:00
Stephane Nicoll d8c972c27e Merge branch '1.3.x' 2016-03-21 11:56:21 +01:00
Stephane Nicoll b1b84a358d Fix Artemis embedded mode condition
This commit prevents the Artemis embedded mode to kick-in if the
`EmbeddedJMS` class it not in the classpath. The previous condition would
match if only `artemis-server` was on the classpath while
`artemis-jms-server` is actually required.

Closes gh-5452
2016-03-21 11:55:59 +01:00
Stephane Nicoll fa84b179a8 Allow to customize the Couchbase environment
Closes gh-5403
2016-03-18 09:08:41 +01:00
Stephane Nicoll caf11e4445 Add Couchbase cache support
This commit updates the cache auto-configuration to provide a
`CouchbaseCacheManager` if a `Bucket` has been configured.

The global customizer infrastructure allows to further tune the cache
manager if necessary.

Closes gh-5176
2016-03-18 07:52:56 +01:00
Stephane Nicoll 25f00b9bb8 Polish contribution
Closes gh-5341
2016-03-17 13:25:35 +01:00
Gary Russell 08732fe4c8 Add Retry Config: Template and Listener
Also add requeue rejected to listener config and
timeouts to RabbitTemplate config.

Closes gh-5340
2016-03-17 13:01:33 +01:00
Stephane Nicoll f4bb9e3ba7 Polish doc
Closes gh-5404
2016-03-17 12:53:32 +01:00
Stephane Nicoll e67f2e2983 Separate Couchbase setup from Spring Data
This commit separates the basic setup of Couchbase from Spring Data so
that a `Bucket` and `Cluster` bucket beans are exposed even if Spring
Data is not available.

A basic setup happens if `spring.couchbase.bootstrap-hosts` is specified,
configuring the `default` bucket with no authentication unless specified
otherwise.

If Spring Data is available, those beans are re-used by default to
configure the `CouchbaseTemplate` and other repository-related beans.

Closes gh-5347
2016-03-14 11:11:48 +01:00
Stephane Nicoll d22265b13e Allow to disable debug property
Previously, adding `debug=false` in the environment had no effect as the
mere presence of the property was used to enable the debug mode. This
commit makes sure to also check the value and ignore the property if it
is set to `false`.

The documentation has also been updated to refer to the `trace` property.

Closes gh-5374
2016-03-11 11:27:39 +01:00
Stephane Nicoll 8cb602f2d6 Polish doc
Closes gh-5375
2016-03-11 11:01:29 +01:00
Stephane Nicoll 58e8e10abb Fix typo
Closes gh-5343
2016-03-09 17:06:19 +01:00
Phillip Webb b260c20df0 Support JsonSerializer/JsonDeserializer Beans
Add a `@JsonComponent` annotation that can be used to indicate that a
Bean is a JsonSerializer and/or JsonDeserializer that should be
registered with Jackson.

Support is provide via a new `JsonComponentModule` which is
auto-configured in `JacksonAutoConfiguration`.

Also add `JsonObjectSerializer` and `JsonObjectDeserializer` classes
which provided as a convenient base for serializers that work with
Objects.

Fixes gh-3898
2016-03-08 17:33:00 -08:00
Andy Wilkinson 86d87f6b8a Deprecate support for Velocity
Support for Velocity has been deprecated in Spring Framework 4.3 with
the plan being to remove it in 5.0. This commit deprecates Spring
Boot's support in 1.4, with the plan being to remove it in 2.0.

Closes gh-5276
2016-03-07 13:48:17 +00:00
Andy Wilkinson bbd7840785 Allow LoggingSystem to be disabled
In certain environments, such as Jetty configured with centralized
logging, Spring Boot's logging system can be problematic.

This commit adds support for using the existing LoggingSystem system
property, configured with a value of none, to disable the logging
system and rely on the standard logging configuration mechanism for
whatever logging framework is in use.

Closes gh-3571
2016-03-07 11:16:26 +00:00
Johnny Lim 122270c990 Polish
Closes gh-5345
2016-03-06 09:21:00 +01:00
Johnny Lim a6c83787ef Polish
Closes gh-5318
2016-03-03 08:33:21 +01:00
Stephane Nicoll 813d86e5e0 Auto-configure Rabbit MessageConverter
If a `MessageConverter` bean is available, we now associate it to the
created `RabbitTemplate` and `RabbitListenerContainerFactory`. That way,
registering a custom `MessageConverter` is all that's needed.

The Rabbit auto-configuration is now using the new `ObjectProvider` that
offers a nicer API to detect if a primary candidate is available for
optional collaborators.

Closes gh-5088
2016-02-29 19:32:30 +01:00
Stephane Nicoll d13b9a98c5 Auto-configure JMS MessageConverter
If a `MessageConverter` bean is available, we now associate it to the
created `JmsTemplate` and `JmsListenerContainerFactory`. That way,
registering a custom `MessageConverter` is all that's needed.

The JMS auto-configuration is now using the new `ObjectProvider` that
offers a nicer API to detect if a primary candidate is available for
optional collaborators.

Closes gh-4282
2016-02-29 17:33:34 +01:00
Stephane Nicoll d9f4d6ce91 Allow custom CacheResolver
Previously, if a bean of type `CacheResolver` was present in the context
the whole cache auto-configuration would back off. If said
`CacheResolver` hasn't been defined via the `CachingConfigurer`
infrastructure, the application context would fail with a rather
unpleasant error message.

It can be quite common to define custom `CacheResolver` beans as the cache
annotations allow to defines custom cache resolvers per operation. This
commit makes sure that the cache auto-configuration will back-off only if
the `CacheResolver` is named `cacheResolver`.

Closes gh-5201
2016-02-29 15:48:46 +01:00
Stephane Nicoll 6741f05af1 Polish contribution
Closes gh-4903
2016-02-29 14:07:01 +01:00
Phillip Webb 17c9fc585f Polish 2016-02-25 21:32:09 -08:00
Phillip Webb c93ea54ea3 Merge branch '1.3.x' 2016-02-25 21:26:13 -08:00
Phillip Webb 4fd778fed8 Polish CacheManagerCustomizers 2016-02-25 20:05:16 -08:00
Stephane Nicoll 416b689359 Enable prefix by default on RedisCacheManager
An overhaul of the `RedisCacheManager` is expected in Hopper (to be
consumed by Spring Boot 1.4). One of those changes is to make sure every
key have a decent prefix by default.

This commit enables the use of prefix as it is disabled by default.

Closes gh-5175
2016-02-25 13:51:59 +01:00
Stephane Nicoll 0e43f4204f Merge branch '1.3.x' 2016-02-24 14:09:07 +01:00
Stephane Nicoll 5febd497da Support customization of CacheManager
This commit allows to customize the auto-configured `CacheManager` by
exposing a bean of type `CacheManagerCustomizer`. The implementation may
reference the type of a `CacheManager` to determine in which case it has
to be invoked.

Several implementations can be provided and ordered using the regular
`Ordered` interface and `@Order` annotation.

Closes gh-5039
2016-02-24 14:00:38 +01:00
Andy Wilkinson 36cdc81ef4 Merge branch '1.3.x' 2016-02-24 11:39:10 +00:00
Andy Wilkinson aa17599675 Clarify handling of files specified in spring.config.location
Closes gh-5147
2016-02-24 11:39:02 +00:00
Stephane Nicoll 2da9f6d91c Merge branch '1.3.x' 2016-02-23 14:43:56 +01:00
Stephane Nicoll c4205d04b3 Rework ListenerContainerFactory configurers
Rework commit b726974 to avoid exposing setters that would permit anyone
to change Spring Boot's defaults. Also, since these are configurers of a
specific instance, they should be named accordingly.

Closes gh-5138
2016-02-23 14:43:33 +01:00
Stephane Nicoll 90f0fc6ce3 Harmonize JTA properties
Previously, both Atomikos and Bitronix were bound on the `spring.jta`
namespace which makes very hard to figure out which property belong to
which implementation. Besides, `AtomikosProperties` only exposed public
setter which does not generate any useful meta-data.

This commit moves the external configuration for Atomikos and Bitronix to
`spring.jta.atomikos.properties` and `spring.jta.bitronix.properties`
respectively. It also improves the meta-data support for those two
namespaces.

Closes gh-5165
2016-02-16 16:44:50 +01:00
Stephane Nicoll 81fdc99fb0 Polish doc
See gh-3498
2016-02-16 13:45:48 +01:00
Stephane Nicoll 52950717e0 Polish 2016-02-16 09:34:26 +01:00
Stephane Nicoll da3b49e024 Polish contribution
Closes gh-3499
2016-02-16 09:31:50 +01:00
Stephane Nicoll b205e02e33 Upgrade to Spring Data Hopper M1
Closes gh-5120
2016-02-15 14:57:08 +01:00
Stephane Nicoll 85cc885fd1 Merge branch '1.3.x' 2016-02-12 16:26:41 +01:00
Stephane Nicoll b726974bca Allow to easily customize ListenerContainerFactory
Previously, if one wants to create a custom `JmsListenerContainerFactory`
or `RabbitListenerContainerFactory`, a bunch of code from the auto-
configuration must be duplicated.

This commit introduces two services to configure such factory for JMS
and AMQP with the same sensible defaults that were applied by the
auto-configufrations.

Closes gh-5138
2016-02-12 16:16:44 +01:00
Stephane Nicoll 187d26ae10 Merge branch '1.3.x' 2016-02-11 17:00:16 +01:00
Stephane Nicoll abf9d66edf Document how to configure access logging
Also, the section on `server.*` configuration was poor so this commit
also improves it.

Closes gh-4989
2016-02-11 16:59:47 +01:00
Kazuki Shimizu 4e177eeed7 Auto-configure ResourceUrlEncodingFilter when using FreeMarker
Closes gh-5126
2016-02-11 11:33:57 +00:00
Stephane Nicoll ebffa493e4 Harmonize ConfigurationProperties bean name
When `@EnableConfigurationProperties` is defined, Spring Boot
automatically registers a bean in the context for each class specified
on the annotation. Previously, the name of the bean only included the
prefix which leads to conflict if two different classes use the same
prefix.

This commit changes the bean name structure to be <prefix>-<fqn> where
prefix is the prefix used on the annotation and <fqn> the fully qualified
name of the target class.

Closes gh-4395
2016-02-09 17:19:11 +01:00
Stephane Nicoll a27176807f Polish contribution
Closes gh-4188
2016-02-08 15:44:09 +01:00
Stephane Nicoll 34d87df425 Clarify use of the `spring.datasource` prefix
Previously, Spring Boot mapped both `DataSourceProperties` and the actual
`DataSource` implementation to the same prefix. This results in a huge
amount of keys in the `spring.datasource` namespace  with no way to
identify those that are valid for the pooled data source in use.

This commit maps the four pooled data sources we support in four isolated
namespace, keeping `spring.datasource` only for the common settings.

These are `spring.datasource.tomcat`, `spring.datasource.hikari`,
`spring.datasource.dbcp` and `spring.datasource.dbcp2` for the Tomcat,
Hikari, Commons DBCP and Commons DBCP2 implementations respectively.

Closes gh-2183
2016-02-03 11:05:23 +01:00
Johnny Lim 46540de694 Fix typos
Closes gh-5067
2016-02-02 11:19:07 +01:00
Stephane Nicoll f5edd53d86 Merge branch '1.3.x' 2016-02-02 08:52:01 +01:00
Stephane Nicoll 6ea74501e7 Clarify registration of ApplicationListener
Spring Boot fires event very early in the application lifecycle and we
should make crystal clear that a regular `@Bean` registration cannot be
used to register a listener on them.

Closes gh-5061
2016-02-02 08:50:32 +01:00
Stephane Nicoll b02073b455 Polish 2016-01-27 17:12:09 +01:00
Stephane Nicoll e293008c3f Rename redis starter to spring-boot-starter-data-redis
Closes gh-1033
2016-01-26 08:31:34 +01:00
Stephane Nicoll bead239448 Remove support for Log4j
Apache Log4j 1.x is EOL and has now been replaced by log4j 2. This commit
removes the deprecated support for Log4j 1.x

See gh-4905
2016-01-25 14:06:06 +01:00
Johnny Lim 9a31e02806 Polish
Closes gh-5013
2016-01-24 19:13:01 +01:00
Stephane Nicoll ea5195c8a6 Better document how DataSource is bound to the env
Closes gh-4971
2016-01-21 11:13:12 +01:00
Andy Wilkinson 5e5542f09c Describe the ordering of spring.config.location in the documentation
Closes gh-4964
2016-01-20 12:13:57 +00:00
Kazuki Shimizu 908c9562e5 Fix invalid port number in doc
Closes gh-4867
2016-01-03 13:43:46 +01:00
Stephane Nicoll a87a1f053f Polish documentation
Clarify that "spring.config.*" properties doesn't work in configuration
files.

Closes gh-4838
2015-12-25 08:21:09 +01:00
Phillip Webb 506ee897f3 Document how to configure root logging level
Fixes gh-2872
2015-12-17 10:55:46 +00:00
Phillip Webb 5e84bfd91b Merge branch '1.2.x' 2015-12-16 18:45:42 +00:00
Phillip Webb ce2a68276c Add ServletContext initialization documentation
Update the documentation to include a section about ServletContext
initialization with embedded servlet containers. This update is to
primarily highlight that `WebApplicationInitializers` and Servlet 3.0+
`ServletContainerInitializers` are not called.

Fixes gh-4643
2015-12-16 18:41:46 +00:00
Andy Wilkinson 08720b4612 Document need to avoid Logback placeholder format in logging properties
Closes gh-4731
2015-12-15 14:28:44 +00:00
Phillip Webb 0489a3b4de Polish 2015-12-10 19:43:29 +00:00
Stephane Nicoll 2d003a698f Revert 5464c65
See gh-4709
2015-12-09 10:59:27 +01:00
Stephane Nicoll 5464c65ca8 Polish contribution
Use the same value as we do.
2015-12-09 09:57:04 +01:00
Johnny Lim 12a921c200 Polish docs
Closes gh-4709
2015-12-09 09:49:42 +01:00
Yunkun Huang 3f9a2aa145 Document randomPort attribute on WebIntegrationTest
Closes gh-4548
2015-12-03 11:17:31 +00:00
Vedran Pavic 884cae6f8d Add support for using ${application.title} in startup banners
This commit introduces a new property, application.title, that can
be used in a banner. Its value is resolved from the application
manifest's Implementation-Title attribute.

Closes gh-4603
2015-12-02 10:09:42 +00:00
Andy Wilkinson f25a5e3b77 Improve documentation of color-coded console output
This commit documents the color converter, the explicit colors and
styles that is supports, and the implicit colors used for each log
level.

 Closes gh-4592
2015-12-01 16:28:09 +00:00
Stephane Nicoll 5cdd874d55 Document `@AutoconfigureOrder`
Closes gh-4546
2015-11-30 11:18:34 +01:00
Stephane Nicoll 43b8e65eee Add dedicated section for `spring.main.banner-mode`
One of the options of the new `banner-mode` property is `off`. YAML maps
`off` to `false` and since we are exposing the method from the
`SpringApplication` public class we can't change the signature to accept
a `String` and do the conversion ourselves.

This commit adds a dedicated section in the guide to warn users about
that particular situation. Adding quotes around the value prevents the
conversion.

Closes gh-4600
2015-11-27 14:04:58 +01:00
Stephane Nicoll 77190f126a Create dedicated section for property conversion
See gh-4604
2015-11-27 11:42:23 +01:00
Stephane Nicoll e57244d8bc Merge branch '1.2.x' 2015-11-23 09:42:27 +01:00
Dimitri c605675b7a Fix wrong class reference
Closes gh-4551
2015-11-23 09:41:34 +01:00
Johnny Lim 8ec00c35bf Polish
Closes gh-4572
2015-11-21 08:12:21 +01:00
Stephane Nicoll b83368a503 Fix case for MockMvc
Closes gh-4459
2015-11-13 13:12:27 +01:00
Johnny Lim 4c1398148b Polish docs
Closes gh-4433
2015-11-11 15:04:45 +01:00
Phillip Webb 6c2ea4648f Polish 2015-11-03 20:36:20 -08:00
Phillip Webb fd1cbed51c Merge branch 1.2.x 2015-11-03 14:56:16 -08:00
Phillip Webb 2118242e00 Polish 2015-11-03 14:06:44 -08:00
Dave Syer cfb12fc7c2 Clarify how to switch off security autoconfiguration
The fact that the web security and the authentication manager are
controlled separately should hopefully now be clearer.

Fixes gh-3292
2015-11-02 10:44:54 +00:00
Dave Syer ba7d12c697 Clarify application.properties example
The syntax was a bit tortured. This should clarify things and also
de-emphasise the "production" use case for the file system
properties file (we want to be cloud native don't we?).
2015-10-30 10:04:28 +00:00
Dave Syer 1f675c026f Add support for inline JSON in SPRING_APPLICATION_JSON
User can supply inline JSON as an env var (SPRING_APPLICATION_JSON)
or System property (spring.application.json).

Fixes gh-4239
2015-10-30 09:45:55 +00:00
Tommy Ludwig 2516dc033f Fix documentation example
Previously, the nested private static class would cause an error at
startup stating that it was not accessible when trying to bind the
property from the environment. The nested class should be public.

Closes gh-4323
2015-10-28 17:52:16 +01:00
Johnny Lim e2a8fc461c Polish docs
Closes gh-4328
2015-10-28 17:51:32 +01:00
Johnny Lim e477598cc6 Fix broken links
Closes gh-4272
2015-10-22 17:45:35 +02:00
Stephane Nicoll c0b8974bc0 Merge branch '1.2.x' 2015-10-22 17:42:22 +02:00
Stephane Nicoll 7c1bf58262 Filter duplicate
Improve the initial PR to include a filtering of the profiles that were
already enabled via the `spring.profiles.active` property.

Also add more tests to prove that each profile is loaded only once
now.

Closes gh-4273
2015-10-22 17:19:56 +02:00
Stephane Nicoll 32b32b7142 Notify the use of logback specific system property
Logback documentation explains how to initialize the logging system and
namely how the `logback.configurationFile` system property can be used to
specify the configuration file to use.

Spring Boot has an abstraction on top of that. A user can define the
`logging.path` property regardless of the logging infrastructure it is
using.

Users following the logback documentation can be confused at first so
we're not logging a warning when we found out that the logback specific
property has been specified.

Closes gh-2382
2015-10-19 14:37:12 +02:00
Andy Wilkinson f8cffd745c Merge branch '1.2.x' 2015-10-16 10:42:26 +01:00
Andy Wilkinson 35a3f4a1c0 Reinstate the use of shutdown hooks in the tests
Commit adf2c44b was an attempt to prevent HSQLDB from throwing an
exception when the JVM exits. This was achieved by disabling the
application context’s shutdown hook in the tests. This had the unwanted
side effect of causing tests’ application contexts not to be closed. The
reported symptom was that @Destroy methods were no longer being invoked.
We need a different solution to the problem.

The exception was:

Caused by: org.hsqldb.HsqlException: Database lock acquisition failure: attempt to connect while db opening /closing
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.DatabaseManager.getDatabase(Unknown Source)
    at org.hsqldb.DatabaseManager.newSession(Unknown Source)
    ... 23 common frames omitted

I originally thought this was due to a race between the application
context’s shutdown hook and HSQLDB’s shutdown hook, however HSQLDB
doesn’t use a shutdown hook. I believe that the problem is due to 
an HSQLDB database being created with shutdown=true in its URL, similar
to the problem described here [1]. This will shut down the database when
the last connection to it is closed, however the shutdown will happen
asynchronously. If the JVM then runs the application context’s shutdown
hook, EmbeddedDatabaseFactory will attempt to connect to the database to
execute the SHUTDOWN command. This executes synchronously but will race
with the asynchronous shutdown that’s executing as a result of
shutdown=true in the JDBC url and the last connection to the database
being closed. 

This commit reinstates the use of application context shutdown hooks in
the tests, and updates the documentation to recommend that, if a user
manually configures the URL for their embedded database, they do so 
in such a way that the database doesn’t shutdown automatically, thereby
allowing the shutdown to be driven by application context close.

Closes gh-4208

[1] http://sourceforge.net/p/hsqldb/bugs/1400/
2015-10-16 10:36:20 +01:00
Phillip Webb 922f8b6ba6 Add `server.session.store-dir` support
Add support for a `server.session.store-dir` property which can be used
to specify where session data source be saved.

Fixes gh-4191
2015-10-14 22:56:01 -07:00
Phillip Webb 143536f72d Polish 2015-10-14 12:52:38 -07:00
Stephane Nicoll 4fca78a9fc Clarify debug mode
Closes gh-3853
2015-10-14 15:59:44 +02:00
Stephane Nicoll 496744486c Add links to sample auto-configuration classes
Closes gh-3767
2015-10-14 15:14:20 +02:00
Stephane Nicoll 06c78a41cd Document that ConfigurationProperties can't use SpEL
Closes gh-1768
2015-10-14 14:36:33 +02:00