Commit Graph

177 Commits

Author SHA1 Message Date
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
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
Stephane Nicoll 6393569d42 Polish Externalized Configuration section
Closes gh-3823
2015-08-25 15:22:02 +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
Stephane Nicoll 5f2ffdb9e2 Update SnakeYAML link
Closes gh-3302
2015-06-22 10:44:23 +02:00
Andy Wilkinson 0253f21f2f Update the link to Bitronix's documentation
Closes gh-3207
2015-06-15 14:25:24 +01:00
Stephane Nicoll 01ba732a73 Consistent use of "=" for property key
Closes gh-3218
2015-06-14 09:36:10 +02:00
Stephane Nicoll e16f5d03ab Add reference to Mustache to documentation
Closes gh-3121
2015-06-08 15:16:01 +02:00
Josh Thornhill 10f7031e46 Fix typo in documentation
Closes gh-3077
2015-06-02 11:50:49 +02:00
Phil Parker eb92dfbb3b Fix link to Groovy documentation
Closes gh-3054
2015-05-28 15:28:48 +02: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 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 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
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