Commit Graph

5955 Commits

Author SHA1 Message Date
Stephane Nicoll
3cabca7db4 Merge pull request #4118 from mdeinum/gh-4115
* pr/4118:
  Polish
  Added support for the DB2 AS400 Driver
2015-10-09 17:18:24 +02:00
Stephane Nicoll
b9c885f5d2 Polish
Closes gh-4118
2015-10-09 17:16:46 +02:00
Marten Deinum
bad8c1bee8 Added support for the DB2 AS400 Driver
Closes gh-4115
2015-10-09 17:16:21 +02:00
Stephane Nicoll
7fd9d58fd6 Merge pull request #4119 from mdeinum/gh-4114
* pr/4119:
  Polish
  Add support for the DB2 Universal JDBC driver
2015-10-09 17:05:18 +02:00
Stephane Nicoll
7971ef24ce Polish
Closes gh-4119
2015-10-09 17:05:06 +02:00
Marten Deinum
96830a550a Add support for the DB2 Universal JDBC driver
Closes gh-4114
2015-10-09 17:03:13 +02:00
Stephane Nicoll
c8e2b27e09 Merge pull request #4120 from d10xa/fix-typo
* pr/4120:
  Fix typo
2015-10-09 17:02:29 +02:00
d10xa
d5e3e991fa Fix typo
Closes gh-4120
2015-10-09 17:02:13 +02:00
Stephane Nicoll
02ef68163a Remove redundant deprecated attribute
The `deprecated` attribute is deprecated as of Spring Boot 1.3 and
replaced by the `deprecation` object. Any IDE relying on the previous
structure still expects the `deprecated` attribute though.

The annotation processor is adding that information automatically when it
merges manual content so it is not necessary to define that attribute in
the source.

Closes gh-4127
2015-10-09 16:53:17 +02:00
Stephane Nicoll
ce544e8131 Add a reference to Windows service sample
Closes gh-3829
2015-10-09 16:37:58 +02:00
Andy Wilkinson
2afb641603 Merge branch '1.2.x' 2015-10-09 15:21:21 +01:00
Andy Wilkinson
04c2bd9c89 Update tests to expect additional entry in test jar
Closes gh-4124
2015-10-09 15:19:50 +01:00
Andy Wilkinson
8948322d7a Merge branch '1.2.x' 2015-10-09 14:59:54 +01:00
Andy Wilkinson
888fa90265 Ensure that JarFileArchive unpacks entries to unique location
Previously, JarFileArchive would always unpack any entries marked for
unpacking to ${java.io.tmpdir}/spring-boot-libs. This could cause
problems if multiple Spring Boot applications were running on the same
host:

- If the apps are run as different users the first application would
  create the spring-boot-libs directory and the second and subsequent
  applications may not have write permissions to that directory
- Multiple apps may overwrite each others unpacked libs. At best this
  will mean one copy of a jar is overwritten with another identical
  copy. At worst the jars may have different contents so that some of
  the contents of the original jar disappear unexpectedly.

This commit updates JarFileArchive to use an application-specific
location when unpacking libs. A directory beneath ${java.io.tmpdir} is
still used but it's now named <jar-file-name>-spring-boot-libs-<uuid>.
A loop, limited to 1000 attempts, is used to avoid problems caused by
the uuid clashing.

Closes gh-4124
2015-10-09 14:59:18 +01:00
Andy Wilkinson
9973147291 Merge branch '1.2.x' 2015-10-09 13:21:27 +01:00
Andy Wilkinson
f7d2bafb3e Use Java 8 on Travis as the samples now require it
Commit 09395f95 updated the samples to require Java 8. This commit
updates the Travis configuration to build with Java 8.

Closes gh-4133
2015-10-09 13:18:29 +01:00
Andy Wilkinson
aae1b31f3a Merge branch '1.2.x' 2015-10-09 12:42:23 +01:00
Andy Wilkinson
0069e41c29 Prevent closed context from being refreshed again by an HTTP request
Prior to this commit, EmbeddedWebApplicationContext would perform its
close processing and then stop the embedded container. This could
lead to the closed context's dispatcher servlet handling an HTTP
request and refreshing the context again. This opened up two
possibilities that we need to avoid:

1. Another HTTP request could be received by the dispatcher servlet
   while the context is still being refreshed. This could lead to the
   context being used before its refreshed. I believe this could be
   the cause of the current modification exception described in
   gh-3239 and SPR-13123.
2. It can lead to a race during shutdown as the shutdown hook's
   attempt to close the context races with the refresh initiated by
   the HTTP request. This is possible as the shutdown hook bypasses
   the sychronization on startupShutdownMonitor that would normally
   prevent refresh and close from occurring in parallel. This race
   can lead to a deadlock as described in gh-4130

Closes gh-4130
2015-10-09 12:24:43 +01: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
Stephane Nicoll
535a696604 Polish 2015-10-09 09:31:53 +02:00
Andy Wilkinson
46c397007c Avoid ClassCastExceptions in DevTools when using Spring HATEOAS
Spring HATEOAS’s DummyInvocationUtils, that is used by
ControllerLinkBuilder, uses Objenesis. By default, Objenesis caches
the instances that it creates and uses the class name as the cache key.
This is problematic when DevTools’ restart support is enabled as the
class loader changes with each restart and ClassCastExceptions occur
due to Objenesis returning a cached instance that was created by an
old restart class loader.

This commit works around the problem described above by auto-configuring
a bean that uses reflection to replace DummyInvocationUtils’ default
Objenesis instance with one that has caching disabled.

Closes gh-3784
2015-10-08 18:53:25 +01:00
Andy Wilkinson
29e3339fef Upgrade to Undertow 1.3.0.CR3
See gh-3969
2015-10-08 16:25:23 +01: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
4594edf4c4 Merge branch 'gh-4001' 2015-10-08 14:44:43 +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
Andy Wilkinson
031a8d5afa Polishing
Add missing javadoc to AuthoritiesExtractor and
FixedAuthoritiesExtractor
2015-10-08 14:40:52 +01:00
Dave Syer
4768faaba7 Add an AuthoritiesExtractor strategy for UserInfoTokenServices
Default will extract an "authorities" key from the map coming from the
server. No existing servers I am aware of actually send that data, but
it might be helpful as a default nevertheless. User can override the
default by adding a bean of that type.

Fixes gh-3711
2015-10-08 12:13:42 +01:00
Stephane Nicoll
eadd20e9ca Merge pull request #4103 from vpavic/gh-4102
* pr/4103:
  Polish
  Add dependency management for hazelcast-hibernate4
2015-10-08 12:12:39 +02:00
Stephane Nicoll
aa0fec24eb Polish
Closes gh-4103
2015-10-08 12:12:22 +02:00
Vedran Pavic
57411781f5 Add dependency management for hazelcast-hibernate4
See gh-4103
2015-10-08 12:12:07 +02:00
Dave Syer
e26a4c5347 Merge branch '1.2.x' 2015-10-08 10:21:06 +01:00
Dave Syer
7b6de545e7 Change HashSet to LinkedHashSet to preserve order of file extensions
Fixes gh-4111
2015-10-08 10:20:43 +01:00
Phillip Webb
10ce135c7c Update Eclipse settings to generate isXXX setters
Somehow the setting was changed so that `boolean` fields generated
getXXX() rather than isXXX().
2015-10-08 00:07:28 -07:00
Phillip Webb
81ebf9aa5c Polish 2015-10-07 23:46:39 -07:00
Phillip Webb
75bf01840b Add Eclipse Installer setup file
Add `spring-boot-project.setup` to `/eclipse` to setup and configure
new Eclipse installations.

Fixes gh-4110
2015-10-07 23:40:42 -07:00
Phillip Webb
c525689b0f Polish 2015-10-07 23:40:34 -07:00
Phillip Webb
aae38db9af Fix compiler warnings only shown in Eclipse Mars 2015-10-07 23:40:28 -07:00
Phillip Webb
a0fc90a5ec Compile samples and integration tests with Java 8
Update the samples and integration tests to use Java 8. There's no
specific reason to keep them on Java 6 and it helps keep Eclipse happy
if we upgrade.
2015-10-07 23:40:20 -07:00
Phillip Webb
2a16c25977 Replace import-control checkstyle file with regex
Fix Eclipse build warnings by replacing checkstyle's import-control file
with a simple regex rule.

Fixes gh-4006
2015-10-07 23:40:14 -07:00
Phillip Webb
82fffe3062 Relax ParenPad checkstyle rule
Eclipse Mars has a formatter bug (#479291) that sometimes adds
additional whitespace on annotations. Until it's fixed we need to relax
the `ParenPad` checkstyle rule.
2015-10-07 23:37:47 -07:00
Phillip Webb
c9fb9916b8 Reformat code using Eclipse Mars 2015-10-07 23:37:10 -07:00
Phillip Webb
e473364e4e Merge branch '1.2.x' 2015-10-07 23:34:08 -07:00
Phillip Webb
6ab376e2e8 Reformat code use Eclipse Mars 2015-10-07 23:32:31 -07:00
Phillip Webb
47576354f7 Merge branch '1.2.x' 2015-10-07 23:19:50 -07:00
Phillip Webb
ba7c1fda72 Convert Gradle plugin from Groovy to Java
Replace existing Groovy code with Java since the Groovy Eclipse tooling
currently forces the use of an old jdt plugin which has formatter bugs.

Fixes gh-4113
2015-10-07 23:12:25 -07:00
Phillip Webb
09395f956a Compile samples and integration tests with Java 8
Update the samples and integration tests to use Java 8. There's no
specific reason to keep them on Java 6 and it helps keep Eclipse happy
if we upgrade.
2015-10-07 19:46:11 -07:00
Phillip Webb
cb6e30c8f5 Ignore helpmojo from Eclipse m2e config
Ignore the `helpmojo` goal to save needing an additional Eclipse plugin.
2015-10-07 19:45:20 -07:00