1136 Commits

Author SHA1 Message Date
Andy Wilkinson
0061e84a59 Document DevTools' requirement for shutdown hook to be registered
Closes gh-4153
2015-10-26 11:04:54 +00:00
Vedran Pavic
59d2ae598b Update documentation to clarify systemd service user
Closes gh-4293
2015-10-26 10:57:45 +00:00
Stephane Nicoll
9d9538e558 Fix section of Windows service section
As the Windows service support is not related at all to the executable
jar support it needs to be in a separate location.
2015-10-23 17:22:56 +02: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
f43817dd27 Fix broken link
Closes gh-4268
2015-10-22 14:11:30 +02:00
Stephane Nicoll
c086a6a7ff Polish doc 2015-10-21 10:36:11 +02:00
Phillip Webb
a7a2aa0461 Add "INIT INFO" property substitutions
Update the "INIT INFO section" of `launch.script` to include
`initInfoProvides`, `initInfoShortDescription` and `initInfoDescription`
property substitutions.

The Maven plugin has been updated to populate substitutions with
`${project.artifactId}`, `${project.name}` and `${project.description}`.

Fixes gh-4245
2015-10-20 17:48:22 -07:00
Stephane Nicoll
cc3b7ca6f6 Add missing configuration keys for groovy template 2015-10-20 15:46:09 +02:00
Stephane Nicoll
eb2650976f Fix typo 2015-10-20 15:30:07 +02:00
Stephane Nicoll
168fc2f61f Disable addResources by default
Flip the default value of `addResources` for both the Maven and Gradle
plugins. This effectively turns off static resources reloading and, more
importantly, the pruning of duplicate resources from the target
directory.

As devetools is our mainstram solution for such feature, the documantion
has been updated to reflect that.

Closes gh-4227
2015-10-20 15:04:25 +02:00
Stephane Nicoll
bc0eb996ff Polish contribution
Closes gh-4202
2015-10-20 11:35:35 +02:00
Johnny Lim
330073ed17 Fix broken link
Closes gh-4243
2015-10-20 09:10:27 +02:00
zhanhb
299d0653ed Fix default value of MongoDB port in doc
Closes gh-4212
2015-10-19 15:08:43 +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
Tommy Ludwig
e4230e61d7 Make the name of the log file produced by launch script configurable
Previously, the launch script would always use a file named
<appname>.log to capture the application's console output. This commit
adds a variable, LOG_FILENAME, for specifying the file name defaulting
to <appname>.log.

Fixes gh-4194
2015-10-19 11:38:22 +01:00
Marco Vermeulen
673bde0bf7 Update all GVM references to SDKMAN!
Closes gh-4225
2015-10-18 09:20:57 +02:00
Spring Buildmaster
2b38a861e3 Next Development Version 2015-10-16 05:57:24 -07: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
Wallace Wadge
e3315d2252 Allow TraceWebFilter to trace more attributes
Update TraceWebFilter to optionally trace more details from the
HttpServletRequest/HttpServletResponse. The `management.trace.include`
property can be used to change what aspects are logged.

Closes gh-3948
2015-10-14 13:25:11 -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
0785357a8b Add a note related to StatsdMetricWriter dependency
Closes gh-3862
2015-10-14 15:36:36 +02:00
Stephane Nicoll
85d6b499a2 Add a note that CRaSH requires a JDK
Closes gh-3813
2015-10-14 15:25:05 +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
69581f90da Clarify MainClass option of the bootRepackage task
Closes gh-2477
2015-10-14 15:00:33 +02:00
Stephane Nicoll
06c78a41cd Document that ConfigurationProperties can't use SpEL
Closes gh-1768
2015-10-14 14:36:33 +02:00
Stephane Nicoll
cca153e986 Document how to return custom JSON on errors
Closes gh-3999
2015-10-14 14:16:45 +02:00
Stephane Nicoll
e79ef9b73b Add option to exclude devtools from fat jar
Add an `excludeDevtools` property to both the Maven and Gradle plugin
that removes `org.springframework.boot:spring-boot-devtools` (if
necessary) when repackaging the application.

Closes gh-3171
2015-10-14 01:22:57 -07:00
Phillip Webb
e2fc30ef24 Polish 2015-10-14 00:20:32 -07:00
Phillip Webb
ab7bec1160 Update clarify of bean conditions
See gh-4104
2015-10-14 00:20:32 -07:00
Stephane Nicoll
a7bdef61de Clarify usage of @ConditionalOn[Missing]Bean
Closes gh-4104
2015-10-13 18:55:47 +02:00
Stephane Nicoll
9d3858caff Update health endpoint documentation
Closes gh-4157
2015-10-13 18:36:27 +02:00
Stephane Nicoll
e221dfc3a6 Clarify ConversionService initialization
Spring Boot will eagerly initialize a `ConversionService` named
`conversionService` for configuration keys processing. This commit adds
a note in the documentation regarding that special behaviour.

Closes gh-4162
2015-10-13 17:39:31 +02:00
Andy Wilkinson
25e719f549 Fix handling of security.headers.* to allow headers to be disabled
Spring Security 4’s default configuration will, irrespective of any
other header writers that are added, enable writers for the following
headers:

 - X-Content-Type
 - X-XSS-Protection
 - Cache-Control
 - X-Frame-Options

Previously, SecurityProperties.headers used false as the default for the
properties that enable or disable these headers but the configuration is
only applied when the properties are true. This left us with the right
default behaviour (the headers are enabled) but meant that the
properties could not be used to switch off the headers.

This commit changes the defaults for the four properties to true and
updates SpringBootWebSecurityConfiguration to only apply the
configuration when the properties are false. This leaves us with the
desired defaults while allowing users to disable one or more of the
properties by setting the relevant property to false.

Closes gh-3517
2015-10-13 15:43:57 +01:00
Stephane Nicoll
f4c1efd128 Clarify property expansion
So far we have wrongly advertized that the `spring-boot-starter-parent`
filters application configuration in such a way that standard Spring
placeholders are not processed.

In order to achieve such feature, the `useDefaultDelimiters` property
must be set to `false` as otherwise default delimiters are appended to
the list of custom delimiters.

This property is not enabled so that only keys surrounded by `@` are
filtered by the build.

Closes gh-3092
2015-10-13 11:41:23 +02:00
Andy Wilkinson
a899058ac3 Add a tip to the docs about using DB_CLOSE_ON_EXIT=false with H2
Closes gh-4135
2015-10-12 18:08:17 +01:00
Andy Wilkinson
8ee8c9fe90 Merge branch '1.2.x' 2015-10-12 14:12:20 +01:00
Andy Wilkinson
d33d068fae Upgrade to Tomcat 8.0.28 and test support for SSL config from classpath
Prior to 8.0.28 Tomcat required the key store and trust store (if any)
to be available directly on the filesystem, i.e. classpath: resources
would not work. Tomcat 8.0.28 removed this limitation.

This commit updates to Tomcat 8.0.28, updates the tests to verify
the new Tomcat capability and removes the obsolete documentation of
the restriction.

Closes gh-4048
2015-10-12 13:36:32 +01:00
Stephane Nicoll
ce544e8131 Add a reference to Windows service sample
Closes gh-3829
2015-10-09 16:37:58 +02:00
Stephane Nicoll
422444c3f2 Add throwExceptionIfNoHandlerFound property
Add a property to customize if an exception should be thrown when no
handler was found to process a given request.

Closes gh-4000
2015-10-09 11:40:46 +02:00
Andy Wilkinson
4968900b1d Gracefully disable Solr auto-configuration when Solr 5 is on classpath
Previously, if Solr 5 was on the classpath, SolrAutoConfiguration
would fail with a rather cryptic error message due to a change in the
inheritance hierarchy of CloudSolrServer between Solr 4 and Solr 5.

This commit updates SolrAutoConfiguration to be conditional on a
class that exists in Solr 4 but was removed in Solr 5. This has the
effect of switching off the auto-configuration when Solr 5 is on
the classpath, allowing the auto-configuration report to be used to
identify why the configuration was disabled. The documentation has
also been updated to state that Spring Boot does not currently support
Solr 5.0.

Closes gh-2795
2015-10-08 16:24:05 +01:00
Andy Wilkinson
97c8749528 Update configuration metadata for show-banner and banner-mode changes
Closes gh-4001
2015-10-08 16:02:52 +01:00
Andy Wilkinson
36d4246289 Add opt-in support for registering a shutdown hook to shut down logging
This commit adds a new property, logging.register-shutdown-hook, that
when set to true, will cause LoggingApplicationListener to register
a shutdown hook the first time it initializes a logging system. When
the JVM exits, the shutdown hook shuts down each of the supported
logging systems, ensuring that all of their appenders have been
flushed and closed.

Closes gh-4026
2015-10-08 15:53:22 +01:00
Andy Wilkinson
01eb4cf954 Rework breaking API changes
This commit changes the new mode-based configuration to use two new
methods – setBannerMode on SpringApplication and bannerMode on
SpringApplicationBuilder. The old methods, setShowBanner and
showBanner on SpringApplication and SpringApplicationBuilder
respectively, have been reinstated and deprecated.

Closes gh-4001
2015-10-08 14:41:50 +01:00
“Jeremy
3090659971 Add an option to log banner rather than printing it to standard out
This commit adds the option to output the banner using the logger
instead of standard out. Rather than taking a boolean
spring.main.show-banner is now configured using an enum. Three values
are supported:

 - LOG: the banner is logged
 - CONSOLE: the banner is printed to standard out (previously true)
 - OFF: the banner is switched off (previously false)

The default behavior remains unchanged; the banner will be printed to
standard out.

Closes gh-4022
See gh-4001
2015-10-08 14:41:50 +01:00
r11runner
586f525a6b Fix typos
Closes gh-4093
2015-10-06 09:32:15 +02:00