Commit Graph

6745 Commits

Author SHA1 Message Date
Vedran Pavic
0ba9a18cf2 Document use of maven wrapper
Closes gh-4956
2016-01-17 12:32:26 +01:00
Brian Kelly
0f2c25c4b8 Clarify location for Flyway callback scripts
Closes gh-4947
2016-01-15 18:02:57 +00:00
Andy Wilkinson
eb3d64108e Merge branch 'gh-4320' 2016-01-15 17:48:14 +00:00
Andy Wilkinson
f5b973a242 Polish contribution
- Update copyright headers
 - Use kebab-case for the property name
 - Set the header unconditionally when the filter's registered

Closes gh-4320
2016-01-15 17:47:27 +00:00
Eddú Meléndez
c219f5e57f Don't create ApplicationContextHeaderFilter when header is disabled
See gh-4320
Closes gh-4454
2016-01-15 17:47:01 +00:00
Andy Wilkinson
b02cdc7248 Merge branch 'gh-4813' 2016-01-15 17:03:10 +00:00
Andy Wilkinson
93ef795159 More use entrySet() rather than using keySet() and get(key)
This commit replaces some more occurrances of keySet() and get(key)
with more efficient usage of the map's entry set.

See gh-4813
2016-01-15 17:02:42 +00:00
mnhock
8f1f8dd680 Use entrySet() rather than using keySet() and then calling get(key)
Closes gh-4813
2016-01-15 17:01:58 +00:00
Robert Požarickij
48d22f933d Fix grammar in CONTRIBUTING.adoc
Closes gh-4885
2016-01-15 15:55:39 +00:00
Andy Wilkinson
d1b3522227 Provide some guidlines on securing an app that's symlinked into init.d
Closes gh-4935
2016-01-15 15:36:42 +00:00
Andy Wilkinson
97c5a1b3aa Merge branch '1.2.x' 2016-01-15 12:51:31 +00:00
Andy Wilkinson
2f2bba4d26 Fix docs for using YAML to configure Log4J 2
Previously, the documentation stated that jackson-dataformat-yaml was
the only required dependency. This is incorrect. jackson-databind is
also required.

Closes gh-4924
2016-01-15 12:51:19 +00:00
Andy Wilkinson
1107079683 Merge branch '1.2.x' 2016-01-15 11:20:01 +00:00
Andy Wilkinson
b56eef236e Close Reader used by MustacheViewResolver when compiling a Template
Previously, MustacheViewResolver would create an InputStreamReader
that wraps the template Resource's InputStream but would fail to close
the Reader. When the InputStream was a FileInputStream, this caused
the resolver to leak file handles.

This commit updates the resolver to close the Reader once the Template
has been compiled, thereby allowing any underlying resources to be
cleaned up immediately, rather than having to wait for the JVM to exit.

Closes gh-4921
2016-01-15 11:19:24 +00:00
Andy Wilkinson
89beef4099 Merge branch '1.2.x' 2016-01-14 17:09:40 +00:00
Andy Wilkinson
681a866cce Exclude Java agents from class loader created by PropertiesLauncher
PropertiesLauncher creates a ClassLoader that is used by the Launcher
to load an application’s classes. During the creation of this
ClassLoader URLs from its ClassLoader. This resulted resulting in Java
agents that are added to the system class loader via the -javaagent
launch option being available on both the system class loader and the
created class loader. Java agents are intended to always be loaded by
the system class loader. Making them available on another class loader
breaks this model.

This is the same problem that was in ExecutableArchiveLauncher and
that was fixed in ee08667e (see gh-863).

This commit updates PropertiesLauncher so that it skips the URLs of
any Java agents (found by examining the JVM’s input arguments) when
copying URLs over to the new ClassLoader, thereby ensuring that Java
agents are only ever loaded by the system class loader.

Closes gh-4911
2016-01-14 17:05:08 +00:00
Andy Wilkinson
24fd503743 Merge branch '1.2.x' 2016-01-14 15:57:13 +00:00
Andy Wilkinson
b99739212a Correct the name of MySQL's XADataSource implementation
Closes gh-4942
2016-01-14 15:53:00 +00:00
Phillip Webb
13db85f84b Add ExitCodeExceptionMapper support
Add ExitCodeExceptionMapper strategy interface which can be used to map
exceptions to exit codes.

Closes gh-4803
2016-01-14 11:55:40 +00:00
Andy Wilkinson
487a66a75f Resend SIGTERM if app is still running 30 seconds after first attempt
Previously, the default launch script would send SIGTERM once and then
wait for up to 60 seconds for the app to have stopped. If the service
was stopped immediately after being started the first SIGTERM would
occasionally be ignored (presumably because the JVM was not yet in a
state to handle it) causing the service stop request to fail.

This commit updates the launch script to resend SIGTERM to the process
if it's still running 30 seconds after the first SIGTERM was sent.

Closes gh-4941
2016-01-14 10:37:45 +00:00
Andy Wilkinson
3afd0c7b3b Address Shellcheck warning (SC2086) for $arguments in launch script
$arguments needs to be split on spaces so it can’t just be wrapped
in quotes. This commit updates arguments to be an array that is then
expanded ("{arguments[@]}"). The use of @ and double quotes means that
it is expanded into all elements individually quoted.

See gh-4866
2016-01-14 10:37:37 +00:00
Andy Wilkinson
27a81e1463 Complete static final logger changes that were started in ec2f33f9
This commit completes the changes to consistently used static final
fields for Log instances that were started in ec2f33f9. Specifically it:

 - Removes this. when accessing logger fields that are now static
 - Renames some fields from log to logger
 - Makes some logger fields static

See gh-4784
2016-01-13 16:22:35 +00:00
Andy Wilkinson
150a6f0f5c Switch off Security Filter auto-config when spring-security-config is absent
SecurityFilterAutoConfiguration uses SecurityProperties which uses
SessionCreationPolicy from spring-security-config. This commit makes
SecurityFilterAutoConfiguration conditional on SessionCreationPolicy,
thereby preventing a startup failure if spring-security-web is on the
classpath but spring-security-config is not.

Closes gh-4919
2016-01-13 15:01:31 +00:00
Phillip Webb
152ee95261 Polish 2016-01-13 14:47:21 +00:00
Andy Wilkinson
0fd4af8179 Merge branch 'launch-script' 2016-01-13 13:28:20 +00:00
Andy Wilkinson
d1b47c8a8f Add integration tests for default launch script
This commit adds a suit of integration tests for the launch script. See
the accompanying README.adoc for further details.

Closes gh-4872
2016-01-13 13:28:14 +00:00
Andy Wilkinson
c39a55a270 Fix quoting of start-stop-daemon RUN_ARGS and JAVA_OPTS in launch script
81a4763 introduced a regression when multiple RUN_ARGS or JAVA_OPTS were
configured. Rather than the JVM being launched with multiple arguments
all of the RUN_ARGS or JAVA_OPTS were passed as a single argument. This
caused unexpected behaviour and typically caused the application to fail
to start.

This commit updates the quoting of the arguments the are supplied when
launching the app using start-stop-daemon so that space-separated
entries in RUN_ARGS and JAVA_OPTS remain separate.

Closes gh-4866
2016-01-13 13:28:14 +00:00
Andy Wilkinson
04fe55a2ab Improve portability by using type instead of which in the launch script
Previously, the launch script used which to determine the availability
of start-stop-daemon. which isn’t available by default on all OSs.
For example, it’s not available by default on CentOS 5.

This commit updates the launch script to use type when determining if
start-stop-daemon is available. This improves the portability of the
script and makes the use of type consistent throughout the script.

Closes gh-4925
2016-01-13 13:28:14 +00:00
Andy Wilkinson
a1e0f2f5f0 Update launch script to wait for pid to be written to pid file
Previously, the launch script would wait for the pid file to exist
before continuing. This didn’t work 100% of the time as it left a 
window where the file had been created but the PID had not been written
to it that could result in an incorrect report of the app failing to
start.

This commit updates the script to wait for the file to have a size
greater than zero before continuing. This ensures that the pid has
been written to the file before the pid is read from the file and used
to check that the process is running.

Closes gh-4923
2016-01-13 13:28:14 +00:00
Andy Wilkinson
c1c62c1692 Add dependency management for jackson-jaxrs-json-provider
Closes gh-4932
2016-01-13 13:26:51 +00:00
Phillip Webb
a20cd2de02 Publish ExitCodeEvent when possible
Update SpringApplication to publish an ExitCodeEvent when a valid exit
code is known.

Fixes gh-4804
2016-01-13 13:14:40 +00:00
Phillip Webb
7397dbaf57 Allow ExitCodeGenerator to be used on Exceptions
Update exit code support to allow the ExitCodeGenerator interface to
be placed on an Exception. Any uncaught exception implementing the
interface and returning a non `0` status will now trigger a System.exit
with the code.

Fixes gh-4803
2016-01-13 12:31:37 +00:00
Phillip Webb
d2fed8bb07 Polish 2016-01-13 11:58:42 +00:00
Stephane Nicoll
57b99f0b63 Upgrade to Undertow 1.3.12.Final
Closes gh-4821
2016-01-12 16:33:12 +01:00
Stephane Nicoll
11d4c2c180 Merge pull request #4831 from mrumpf/gh-4822
* pr/4831:
  Fixed the check whether Log4j2 is available on the classpath
2016-01-12 16:25:26 +01:00
mrumpf
1f5291cd84 Fixed the check whether Log4j2 is available on the classpath
In Spring Boot 1.3.1 the class 'org.apache.logging.log4j.LogManager'
is used to check which logging backend is in use. But this class is
part of the log4j-api.jar and not part of the log4j-core.jar.
That means the check is invalid, as it does not detect the actual
core implementation of Log4j2 correctly.

When you want to redirect Log4j2 logging via SLF4J, a NPE occurs
each time the application is reloaded by the devtools, because the
class Log4j2RestartListener tries to shutdown Log4j2 resources.
This is done by accessing some internal shutdown method via
reflection. The method that is being looked for does not exist
when the log4j-api.jar is available only on the classpath,
resulting in a NPE. This causes the application to stop,
disappearing from the Spring Boot Dashboard in Eclipse

Closes gh-4831
2016-01-12 16:14:11 +01:00
Stephane Nicoll
6b4e4e652a Clarify annotation processor config with AspectJ
Closes gh-4847
2016-01-12 15:55:39 +01:00
Andy Wilkinson
2aff82bb64 Merge branch '1.2.x' 2016-01-12 10:19:36 +00:00
Andy Wilkinson
6117b6c5c8 Consistent use of tabs for indentation in pom files 2016-01-12 10:16:40 +00:00
Andy Wilkinson
e4e9a71753 Merge branch '1.2.x' 2016-01-12 10:13:12 +00:00
Andy Wilkinson
8410e545b5 Upgrade copyright headers for 2016 2016-01-12 10:12:49 +00:00
Stephane Nicoll
d8384c52df Add a reference to start.spring.io 2016-01-11 17:46:46 +01:00
Stephane Nicoll
72754c27b2 Allow to override BasicBatchConfigurer
Issue #4533 was supposed to make BasicBatchConfigurer public again but
unfortunately only the class visibility was changed. This commit makes
sure it can be overridden.

Closes gh-4888
2016-01-05 17:53:42 +00:00
Phil Webb
9f41323030 Update CONTRIBUTING.adoc
Update the Oomph instructions.
2016-01-05 13:41:18 +00:00
Andy Wilkinson
a6c0f07376 Merge branch '1.2.x' 2016-01-04 17:18:19 +00:00
zhanhb
fae3397f92 Upgrade to JavaMail 1.5.5
Closes gh-4844
2016-01-04 17:17:39 +00:00
Stephane Nicoll
d51d84303f Merge pull request #4867 from kazuki43zoo/fix-invalid-port-in-doc
* pr/4867:
  Fix invalid port number in doc
2016-01-03 13:44:20 +01:00
Kazuki Shimizu
908c9562e5 Fix invalid port number in doc
Closes gh-4867
2016-01-03 13:43:46 +01:00
Dave Syer
9510938120 Make springIntegrationPublicMetrics conditional on bean by name not type
By type is too restrictive and surprising for users who wanted to add their
own MetricReaderPublicMetrics for other reasons.
2015-12-30 18:01:37 +00:00
Stephane Nicoll
a835912c04 Merge branch '1.2.x' 2015-12-28 14:35:49 +01:00