Commit Graph

9997 Commits

Author SHA1 Message Date
Andy Wilkinson
080ff49c8d Prevent AspectJ from loading aspects too early
Previously, AspectJ would find META-INF/aop.xml almost as soon as
the jar was launched, and before LaunchedURLClassLoader had been
created. This meant that AspectJ would attempt to load aspects listed
in META-INF/aop.xml but that were package in BOOT-INF/classes and,
therefore, could not be loaded.

This commit updates the Repackager so that a META-INF/aop.xml file
is moved into BOOT-INF/classes. This ensures that it isn't visible
to the app class loader so it won't be loaded to early. It will
now be loaded by LaunchedURLClassLoader which can also load the
compiled aspects that aop.xml references.

Closes gh-7587
2017-01-20 16:51:51 +00:00
Andy Wilkinson
a30fe9d9ff Update ServerPropertiesTests to tolerate changes in Tomcat 8.5.11
Closes gh-7360
2017-01-20 16:39:00 +00:00
Andy Wilkinson
b71baf2c38 Support @ContextHierarchy when using @SpringBootTest
Closes gh-8000
2017-01-20 16:24:42 +00:00
Andy Wilkinson
0ad4e0e70f Merge branch '1.4.x' into 1.5.x 2017-01-20 15:53:53 +00:00
Andy Wilkinson
9e2e824098 Upgrade to Tomcat 8.5.11
Closes gh-7360
2017-01-20 15:51:18 +00:00
Andy Wilkinson
bfd319755c Merge branch '1.4.x' into 1.5.x 2017-01-20 15:45:23 +00:00
Andy Wilkinson
0ce7c9516a Document how to configure test- and profile-specific Flyway migrations
Closes gh-2753
2017-01-20 15:44:42 +00:00
Stephane Nicoll
45b93f3223 Merge pull request #8047 from eddumelendez:gh-7965
* pr/8047:
  Upgrade to Spring LDAP 2.3.0.RELEASE
2017-01-20 16:43:04 +01:00
Eddú Meléndez
5b57beca57 Upgrade to Spring LDAP 2.3.0.RELEASE
Closes gh-8047
2017-01-20 16:42:20 +01:00
Stephane Nicoll
fbae14da5d Merge pull request #7600 from michael-simons:DataMongoTest
* pr/7600:
  Polish contribution
  Add slide test annotation for MongoDB
2017-01-20 16:41:08 +01:00
Stephane Nicoll
915c959a28 Polish contribution
Closes gh-7600
2017-01-20 16:40:48 +01:00
Michael J. Simons
8648520876 Add slide test annotation for MongoDB
This commits adds a slice test infrastructure for MongoDB, similar to
what `@DataJpaTest` does with JPA.

By default, an embedded Mongod process is used if available.

See gh-7600
2017-01-20 16:40:47 +01:00
Stephane Nicoll
b19d31e067 Use a random port with embedded Mongo by default
This commit improves the logic of the embedded Mongo support to use a
random port if no custom port has been specified. This doesn't change
the default if the embedded support isn't active.

Closes gh-8044
2017-01-20 16:40:06 +01:00
Andy Wilkinson
b900a3efc8 Update Actuator endpoints to use custom media type
Previously, the actuator's endpoints produced application/json and,
where appropriate, also consumed application/json. Without a custom,
versioned media type, it's impossible for us to make changes to the
endpoints without breaking clients.

This commit introduces a new media type,
application/spring-boot.actuator.v1+json, that is now produced by
default with application/json also being produced if requested.
Endpoints that consume JSON will now also accept content the uses
the new media type in addition to application/json.

Closes gh-7967
2017-01-20 15:31:22 +00:00
Stephane Nicoll
bed545df64 Merge branch '1.4.x' into 1.5.x 2017-01-20 10:54:32 +01:00
Stephane Nicoll
93bc34c1eb Merge pull request #8039 from rafael-rollo:master
* pr/8039:
  Indenting SpringApplication javadoc code
2017-01-20 10:54:10 +01:00
Rafael Rollo
6fba1381c1 Indenting SpringApplication javadoc code
Closes gh-8039
2017-01-20 10:53:34 +01:00
Stephane Nicoll
2c5c539bf1 Document automatic scheduling of metrics export
Closes gh-8040
2017-01-20 10:52:55 +01:00
Stephane Nicoll
079bbfb720 Merge pull request #8038 from artembilan:Spring_AMQP_1.7.0
* pr/8038:
  Upgrade to Spring AMQP 1.7.0.RELEASE
2017-01-20 10:17:13 +01:00
Artem Bilan
00f3ed348e Upgrade to Spring AMQP 1.7.0.RELEASE
Closes gh-8038
2017-01-20 10:16:40 +01:00
Stephane Nicoll
9213245b70 Merge branch '1.4.x' into 1.5.x 2017-01-20 10:15:50 +01:00
Stephane Nicoll
d9a0a55245 Upgrade to Spring AMQP 1.6.7.RELEASE
Closes gh-8033
2017-01-20 10:15:19 +01:00
Phillip Webb
f3cd0ad22c Polish 2017-01-19 12:44:57 -08:00
Phillip Webb
655fa59db0 Merge branch '1.4.x' into 1.5.x 2017-01-19 12:33:42 -08:00
Phillip Webb
b05bdbfe4f Polish 2017-01-19 12:31:43 -08:00
Madhura Bhave
e73c6bb2e2 Exclude authorization header from trace by default
Closes gh-7974
2017-01-19 12:12:09 -08:00
Madhura Bhave
a5a382b8b1 Set AccessTokenConverter if available
Fixes gh-7091
2017-01-19 11:49:54 -08:00
Stephane Nicoll
e5e497ec3a Document @ImportAutoConfiguration#exclude
Closes gh-7862
2017-01-19 16:47:07 +01:00
Stephane Nicoll
e44b595c0d Fix merge issue 2017-01-19 16:36:00 +01:00
Andy Wilkinson
84edf0167f Merge branch '1.4.x' into 1.5.x 2017-01-19 15:27:45 +00:00
Andy Wilkinson
e04ace89b9 Fix LinkageError with ExpectedException and FilteredClassPathRunner
Previously, when the ExpectedException JUnit rule was used with
FilteredClassPathRunner a LinkageError would occur if any of
ExpectedException's methods that take a Hamcrest Matcher were called.
This was due to the FilteredClassLoader delegating loading of
org.junit classes to its parent but not org.hamcrest classes. This
resulted in JUnit classes loading one version of the Hamcrest class
and the test class loading another.

This commit ensures that both the JUnit classes and the test class
use the same version of Hamcrest classes by also delegating the
loading of org.hamcrest classes to FilteredClassLoader's parent.
2017-01-19 15:27:18 +00:00
Stephane Nicoll
ecafd384b7 Merge branch '1.4.x' into 1.5.x 2017-01-19 16:19:53 +01:00
Stephane Nicoll
9a9c4c75bf Merge pull request #8030 from michael-simons:fix-appendix-b
* pr/8030:
  Fix closing parentheses
2017-01-19 16:19:40 +01:00
Michael J. Simons
a852c49edd Fix closing parentheses
Closes gh-8030
2017-01-19 16:19:07 +01:00
Stephane Nicoll
d2299555d2 Merge branch '1.4.x' into 1.5.x 2017-01-19 16:14:44 +01:00
Stephane Nicoll
ffa6d6d6e0 Improve error message used in TestDatabaseAutoConfiguration
By default, `@DataJpaTest` (and `@AutoConfigureTestDatabase`) attempt to
replace any existing `DataSource` by an embedded one. Previously, if
there is was no embedded database on the classpath, the exception message
did not provide that context in the error message.

This commit clarifies the error message to conduct
`TestDatabaseAutoConfiguration` (that is replacing the existing
`DataSource`).

Closes gh-7797
2017-01-19 16:13:49 +01:00
Andy Wilkinson
6d22e5b733 Merge pull request #7990 from Johannes Edmeier
* gh-7990:
  Polish "Avoid property name collisions when serializing AuditEvent to JSON"
  Avoid property name collisions when serializing AuditEvent to JSON
2017-01-19 12:39:59 +00:00
Andy Wilkinson
3e88c366ec Polish "Avoid property name collisions when serializing AuditEvent to JSON"
See gh-7990
2017-01-19 12:39:14 +00:00
Johannes Edmeier
fcf36ed091 Avoid property name collisions when serializing AuditEvent to JSON
Previously, in case the data for the audit event contained an entry
with the key "type", the member `type` from the AuditEvent would be
overwritten when rendering to JSON due to the use of @JsonAnyGetter on
the data property.

This commit removes @JsonAnyGetter so that the data map is rendered as
a separate property in the JSON.

Closes gh-7990
2017-01-19 12:33:15 +00:00
Andy Wilkinson
3fcdd310d3 Upgrade to Neo4j OGM 2.1.1
Closes gh-8025
2017-01-19 12:30:55 +00:00
Andy Wilkinson
f93d4a0cbf Add explicit aliases for exclude and excludeName on SpringBootApplication
Previously, SpringBootApplication relied on implicity aliasing of
exclude and excludeName that worked because the two attributes have
the same names as the equivalent attributes on
EnableAutoConfiguration.

This commit updates SpringBootApplication to make the aliases explicit
and also adds tests to EnableAutoConfigurationImportSelectorTests to
verify that the aliasing is working as intended.

Closes gh-7951
2017-01-19 12:29:46 +00:00
Stephane Nicoll
c41ff17dd7 Provide relevant default values for Enums
This commits adds manual metadata for enums that have a default value
since the annotation processor is not able to detect that yet.

Closes gh-7890
2017-01-19 13:19:13 +01:00
Andy Wilkinson
c31a2d8101 Merge branch '1.4.x' into 1.5.x 2017-01-19 11:03:33 +00:00
Andy Wilkinson
80a1e1ae64 Polishing 2017-01-19 11:03:18 +00:00
Andy Wilkinson
4e70cd2934 Merge branch '1.4.x' into 1.5.x 2017-01-19 10:58:34 +00:00
Andy Wilkinson
b7a02e7237 Update TestRestTemplate to apply template handler to URIs
Previously, TestRestTemplate would only apply the UriTemplateHandler
to Strings and not to URIs. When using the auto-configured
TestRestTemplate, this prevented relative URIs from being
made absolute using LocalHostUriTemplateHandler.

The commit updates TestRestTemplate to turn URIs into Strings before
passing them to the delegate RestTemplate. Turning them into Strings
ensures that the delegate calls the UriTemplateHandler.

Closes gh-7891
2017-01-19 10:39:02 +00:00
Andy Wilkinson
531cf5d4f6 Merge branch '1.4.x' into 1.5.x 2017-01-19 09:28:14 +00:00
Andy Wilkinson
6a0fb8e44c Update DevTools' ResourceLoader to delegate to user's custom loader
Previously, when DevTools' was used it would set the application
context's ResourceLoader and overwrite any custom ResourceLoader that
had been configured. On the rare occasion when the user had customized
the ResourceLoader this meant that the customization was lost and
certain resources would become unavailable.

This commit updates DevTools' ResourceLoader to delegate a custom
ResourceLoader if one has been configured. If one has not been
configured it delegates as before, i.e. to
WebApplicationContextResourceLoader for web applications and to
DefaultResourceLoader for all others apps.

Closes gh-8010
2017-01-19 09:28:09 +00:00
Phillip Webb
1d55f5f6cd Merge branch 'gh-7579' into 1.5.x 2017-01-18 21:01:38 -08:00
Phillip Webb
10dbf3c571 Use @Validated as trigger for JSR-330 validation
Update `ConfigurationPropertiesBindingPostProcessor` so that
`@Validated` is expected to be used to trigger JSR-330 validation.

Any existing configuration classes that use JSR-330 annotations but
don't have `@Validated` will currently still be validated, but will
now log a warning. This should give users a chance to add the requested
annotations before the next Spring Boot release where we will use them
as the exclusive signal that validation is required.

Closes gh-7579
2017-01-18 21:01:07 -08:00