Commit Graph

7323 Commits

Author SHA1 Message Date
Andy Wilkinson fc463afb89 Merge branch '1.3.x' 2016-03-29 11:16:16 +01:00
Andy Wilkinson 1043239de0 Ignore non-JavaExec run task when finding application's main class
Previously, FindMainClassTask would look for a property named main
on any class named run. This was based on the assumption that the
run task would be a JavaExec task (typically provided by the
application plugin). If the run task was not a JavaExec task (more
accurately, if it did not have a main property) this would result in
a build failure due to trying to read a non-existent property.

This commit updates FindMainClassTask to only use the main property
of the run task if the task is a JavaExec task. This guarantees that
the property will exist on the task, and unlike using any property
named main on a task named run, also guarantee that its value will
refer to a Java class with a main method.

Closes gh-5501
2016-03-29 11:03:47 +01:00
Stephane Nicoll abd86e50e0 Merge branch '1.3.x' 2016-03-29 11:30:28 +02:00
Stephane Nicoll ae095b2c1b Disable JMX Integration support if necessary
This commit fixes `IntegrationAutoConfiguration` to actually rely on the
auto-configured `MBeanServer` rather than attempting to create it again.

If JMX support is disabled, no attempt to register integration-related
MBeans is made.

Closes gh-5309
2016-03-29 11:27:24 +02:00
Stephane Nicoll 87b963b396 Merge branch '1.3.x' 2016-03-29 10:57:02 +02:00
Stephane Nicoll 3363415712 Polish documentation
Add a reference ot underscore notation

Closes gh-5268
2016-03-29 10:56:46 +02:00
Stephane Nicoll f7ffb017ad Relocate static asset
Closes gh-5504
2016-03-29 09:34:27 +02:00
Stephane Nicoll 6bc6cec1dc Merge pull request #5514 from oembedler/master
* pr/5514:
  Add graphql-spring-boot-starter reference
2016-03-29 09:15:12 +02:00
oEmbedler Inc 9cb6414821 Add graphql-spring-boot-starter reference
Closes gh-5514
2016-03-29 09:12:14 +02:00
Phillip Webb 8783f75d03 Add GitHub Issue and PR templates 2016-03-28 17:04:52 -07:00
Phillip Webb 07313d1245 Merge branch '1.3.x' 2016-03-28 12:52:49 -07:00
Phillip Webb 0a7a283f45 Apply logging system properties on reinitialize
Restore Spring Boot 1.3.2 behavior of re-applying system properties
when SLF4J based loggers are re-initialized. Reapplying system
properties is required when using the Spring Cloud config server since
PropertySourceBootstrapConfiguration directly calls the system
initialize method.

Fixes gh-5491
2016-03-28 12:49:05 -07:00
Stephane Nicoll d66ff0e42b Merge pull request #5508 from izeye/polish-20160328
* pr/5508:
  Polish
2016-03-28 11:47:14 +02:00
Johnny Lim 51bbe5e37a Polish
Closes gh-5508
2016-03-28 11:47:02 +02:00
Stephane Nicoll a2d161caf5 Merge pull request #5500 from izeye/tostring
* pr/5500:
  Fix MockDefinition.toString()
2016-03-27 17:52:18 +02:00
Johnny Lim 46517cddd8 Fix MockDefinition.toString()
Closes gh-5500
2016-03-27 17:52:03 +02:00
Phillip Webb 50cb72cb48 Ignore failing Maven goal from Eclipse 2016-03-25 12:46:53 -07:00
Phillip Webb a3bfc29e6e Fix warnings 2016-03-25 12:46:53 -07:00
Phillip Webb 609704a3bf Polish 2016-03-25 12:46:52 -07:00
Phillip Webb c68e5f12ff Formatting 2016-03-25 12:46:52 -07:00
Phillip Webb faba7a9514 Rename internal OutputCapture classes
Rename the internal versions of OutputCapture to prevent accidental
import.

See gh-5492
2016-03-25 12:46:52 -07:00
Phillip Webb f96cd144dc Remove internal EnvironmentTestUtils
Replace the internal EnvironmentTestUtils using in `spring-boot` tests
with Spring's TestPropertySourceUtils.

Fixes gh-5492
2016-03-25 11:23:17 -07:00
Stephane Nicoll aa171d1945 Merge pull request #5458 from jexp/contrib
* pr/5458:
  Polish contribution
  Add Neo4j support
2016-03-25 11:42:38 +01:00
Stephane Nicoll fd437797b6 Polish contribution
This commit polihes the original Neo4j contribution in several areas.

Rather than providing the packages to scan, this commit rearranges the
`EntityScan` and `EntityScanRegistrar` so that the logic can be shared
for other components. If no package is provided, scanning now defaults to
the "auto-configured" package(s) and a `@NodeEntityScan` annotation
allows to override that.

The configuration has also been updated to detect the driver based on the
`uri` property. If the embedded driver is available we use that by
default. If it is not available, we're trying to connect to a Neo4j
server running on localhost. It is possible to disable the embedded mode
or set the `uri` parameter explicitly to deviate from these defaults.

The sample no longer relies on the embedded driver for licensing reason:
rather it expects an instance running on localhost (like other
data-related samples) and gracefully ignore any connection error. A
README has been added in the sample to further explain the available
options;

Closes gh-5458
2016-03-25 11:39:49 +01:00
Michael Hunger 0658cc8aee Add Neo4j support
See gh-5458
2016-03-25 11:26:57 +01:00
Stephane Nicoll a413acee8b Merge branch '1.3.x' 2016-03-25 10:27:08 +01:00
Stephane Nicoll 422f3d12a3 Merge pull request #5489 from garyrussell/amqp-update13
* pr/5489:
  Upgrade Spring AMQP to 1.5.5.RELEASE
2016-03-25 10:26:16 +01:00
Gary Russell 67cffaebcc Upgrade Spring AMQP to 1.5.5.RELEASE
Closes gh-5489
2016-03-25 10:25:43 +01:00
Andy Wilkinson 13d4409f32 Merge branch '1.3.x' 2016-03-24 17:50:51 +00:00
Andy Wilkinson 86a9fc2f9a Upgrade to Undertow 1.3.19.Final
Closes gh-5264
2016-03-24 17:37:49 +00:00
Andy Wilkinson c42f859390 Ensure that ExplodedArchive lists its file in a consistent order
Closes gh-5422
2016-03-24 17:35:40 +00:00
Andy Wilkinson 209c2cf944 Polishing (again) 2016-03-24 17:23:13 +00:00
Andy Wilkinson 18234ebb26 Polishing 2016-03-24 17:15:44 +00:00
Andy Wilkinson 8a8a06381c Improve location diagnostics in ConfigFileApplicationListener
Closes gh-5486
2016-03-24 16:55:46 +00:00
Andy Wilkinson 1d3b84a5c8 Update Maven plugin's version as part of the release process
Closes gh-5261
2016-03-24 16:35:45 +00:00
Andy Wilkinson c0b74119e0 Use manifest from class’s jar when defining its package
Previously, when defining a package for a class, LaunchedURLClassLoader
would use the manifest from the first location that contained the
required package. If the package was split across multiple locations,
this could lead to the manifest from a jar other than the one that
contains the class being used.

This commit updates LaunchedURLClassLoader so that it will use the
manifest of the jar file that contains the class which triggered the
definition of the package.

Closes gh-5485
2016-03-24 15:59:01 +00:00
Andy Wilkinson 1d099035b1 Protect against a race condition when defining packages
LaunchedURLClassLoader preemptively defines the package for any
classes that it attempts to load so that the manifest from a nested
jar is correctly associated with the package. This can lead to a race
where the package is defined on two threads in parallel, resulting
in an IllegalArgumentException being thrown.

This problem was manifesting itself as a NoClassDefFoundError.
If the initialization of a class failed due to the above-described
IllegalArgumentException, subsequent attempts to use that class
would then fail with a NoClassDefFoundError.

This commit updates LaunchedURLClassLoader to catch the
IllegalArgumentException and then double-check that the package has
already been defined. This approach, including thrown an
AssertionError when the second check fails, is modelled on the
approach taken by URLClassLoader.

Closes gh-5464
2016-03-24 15:59:01 +00:00
Stephane Nicoll 6be92675c2 Remove dependency version from child pom 2016-03-24 14:53:20 +01:00
Stephane Nicoll e8766f21a5 Fix typo 2016-03-24 14:52:10 +01:00
Stephane Nicoll 18d53d1c5b Info contributor documentation
This commit documents the new `InfoContributor` infrastructure.

Closes gh-2559
2016-03-24 14:31:02 +01:00
Andy Wilkinson 58ca9a1c5d Add a BuildInfo task for generating build.properties with Gradle
The commit adds a new BuildInfo task that can be used to generate
a build.properties file, intended for inclusion in the Actuator's
info endpoint.

A default instance of the task can be configure using the plugin's
DSL:

springBoot {
	buildInfo()
}

Additional properties can also be configured using the DSL:

springBoot {
	buildInfo {
		additionalProperties = [
			'foo': 'bar'
		]
	}
}

When configured via the DSL, the Java plugin's classes task is
configured to depend on the build info task. Alternatively, if more
control is required, the task can be declared and configured manually:

task buildInfo(type: org.springframework.boot.gradle.buildinfo.BuildInfo) {
	additionalProperties = [
		'foo': 'bar'
	]
}

classes {
	dependsOn buildInfo
}

See gh-2559
2016-03-24 08:59:55 +00:00
Phillip Webb 4167469781 Attempt to work around couchbase CI failures 2016-03-23 23:29:42 -07:00
Phillip Webb 88f3fa4f78 Document test improvements in 1.4
Closes gh-4901
2016-03-23 22:22:23 -07:00
Phillip Webb 247bdf9c84 Add a new spring-boot-sample-test application
Add a sample application that demonstrates recently added testing
features.

See gh-4901
2016-03-23 22:22:12 -07:00
Phillip Webb 81d5635571 Add @DataJpaTest annotation
Add @DataJpaTest and @AutoConfigureTestDatabase annotations to allow
testing of an application "slice" that only deals JPA.

See gh-4901
2016-03-23 22:22:03 -07:00
Phillip Webb bbc91cc03f Add @WebMvcTest annotation
Add @WebMvcTest and @AutoConfigureMockMvc annotations to allow testing
of an application "slice" that only deals with Spring MVC.

See gh-4901
2016-03-23 22:21:59 -07:00
Phillip Webb 0bd89017b6 Add @JsonTest annotation
Add @JsonTest and @AutoConfigureJsonTesters annotations to allow testing
of an application "slice" that only deals with JSON marshalling.

See gh-4901
2016-03-23 22:21:29 -07:00
Phillip Webb 56fd4e1f76 Add TypeExcludeFilters support
Provide a way for auto-configuration tests to easily filter scanned
components.

See gh-4901
2016-03-23 22:21:23 -07:00
Phillip Webb 46099c753b Add @PropertyMapping support
Add @PropertyMapping annotation which can be used to mark annotation
attributes that should contribute Environment properties.

Provides a quick way for tests to change auto-configuration behavior in
a structured way.

Fixes gh-4901
2016-03-23 22:21:10 -07:00
Phillip Webb e5f224118b Print AutoConfigureReport on test failures
Add a TestExecutionListener to print the auto-configuration report
when a test cannot load.

See gh-4901
2016-03-23 22:21:04 -07:00