Commit Graph

10971 Commits

Author SHA1 Message Date
Andy Wilkinson
01fd8cb8f3 Reinstate Bitronix's default server ID, provide property to override it
Previously, Bitronix's server ID was hard-coded to be
spring-boot-jta-bitronix. This created the possibility of multiple
transaction managers performing recovery on each other's behalf as
they would be unable to identify their own XIDs due to the common
server ID.

This commit reinstates the default (which is the IP address of the
machine on which Bitronix is running), and introduces a new
property, spring.jta.transaction-manager-id, that can be used to
configure the id for both Atomikos and Bitronix. A cautionary note
has also been added to the documentation for Atomikos and Bitronix
explaining the need to configure this property.

Closes gh-1548
2014-10-16 09:44:42 +01:00
Dave Syer
d251b51338 Integrate with @TestPropertySource
Spring 4.2 has a @TestPropertySource which has some of the features of
@IntegrationTest. This change adds @TestPropertySource to the @IntegrationTest
annotation, so that (for instance) the cache key for the context includes
properties for the test.

Since @IntegrationTest has slightly different semantics I do not propose to
deprecate it. Users can use it or @TestPropertySource, the main difference being that
with @IntegrationTest the Spring Boot context loader is aware of the annotation
and it will set sensible defaults for server.port and spring.jmx.enabled.

There are some reflection hacks to overcome the usual fortifications of Spring Test.

Fixes gh-1697
2014-10-15 17:05:57 +01:00
Andy Wilkinson
261b3afca1 Apply spring.jackson.* config to Spring Data REST object mappers
Closes gh-1698
2014-10-15 16:57:06 +01:00
Andy Wilkinson
886bbc3b41 Merge branch '1.1.x' 2014-10-15 16:36:11 +01:00
Andy Wilkinson
9a2d654eba Rename test classes so that their tests are run by Maven 2014-10-15 16:35:48 +01:00
Andy Wilkinson
0a3d8a9bfb Merge branch '1.1.x' and fix failure caused by XML response
Spring 4.1 has added support for XML HTTP message conversion using
Jackson. This was resulting in the response being sent back as XML
rather than JSON. Jackson's XML support doesn't cope well with lists
when it's being asked to deserialize to a Map [1] which is what the
test was doing.

This commit updates the test to indicate that it only accepts
application/json, thereby ensuring that the response can be correctly
deserialized into a Map.

Fixes gh-1715

[1] https://github.com/FasterXML/jackson-dataformat-xml/issues/122
2014-10-15 16:12:35 +01:00
Andy Wilkinson
fff94733ef Rename class so Maven runs its tests
Maven is configured to run tests found in classes ending in Tests.
This meant that the tests in BasicErrorControllerIntegrationTest (note
the missing s) were not being run.

This commit renames the test class so that it's picked up by Maven.
2014-10-15 16:05:25 +01:00
Dave Syer
cd3729b49d Merge branch '1.1.x' 2014-10-15 11:32:05 +01:00
Dave Syer
ecee19057c Add some precautionary tests for documenting AuthenticationManager config 2014-10-15 11:31:44 +01:00
Andy Wilkinson
d4fa5fa1cf Merge branch '1.1.x' 2014-10-15 11:06:45 +01:00
Andy Wilkinson
7cb3ae43d4 Update to Tomcat 7.0.56
Closes gh-1710
2014-10-15 11:05:14 +01:00
Andy Wilkinson
74f5b9b6a9 Merge branch '1.1.x' 2014-10-14 14:57:52 +01:00
Andy Wilkinson
00b6670b78 Revert "Change config for git commit plugin in starter parent"
This reverts commit 26a528ce95.

Fixes gh-1706
2014-10-14 14:55:38 +01:00
Andy Wilkinson
a2c5b6a7bb Preserve dependencies when uninstalling from the CLI
Previously, the CLI did not keep track of a dependency's users. This
meant that installing two extensions with a common dependency and
then unistalling one extension would break the other extension as the
common dependency would be deleted:

 1. Install a that depends on c
 2. Install b that depends on c
 3. Uninstall b
 4. a is now broken as c has been deleted

This commit updates the CLI to maintain a count for each artifact
that's installed into /lib. An artifact is now only deleted when the
count reaches zero.

As part of this change the code has been
extensively refactored to bring the structure into line with other CLI
commands and to improve testability.

Closes gh-1410
2014-10-14 14:40:44 +01:00
Andy Wilkinson
4e636f069f Document the CLI’s install and uninstall commands
Closes gh-1506
2014-10-14 10:49:53 +01:00
Andy Wilkinson
f6bf32c3ee Add option help to the CLI's install and uninstall commands
Closes gh-1704
2014-10-14 10:07:18 +01:00
Gotzon Illarramendi
95d9cf76ea Update README.adoc to add reference to HDIV starter
Closes gh-1699
2014-10-14 09:38:00 +01:00
Andy Wilkinson
a156ae3434 Add missing @since tag 2014-10-14 09:11:56 +01:00
Stephane Nicoll
e60cc57807 Fix typo
Fixes gh-1701
2014-10-13 20:39:30 +02:00
Dave Syer
89197eb03b Add org.hibernate.SQL to the --debug logger levels
I think this fixes gh-446 (it seems unreasonable to want to log the DDL
even if it is not being executed)
2014-10-13 17:53:48 +01:00
Andy Wilkinson
2da4dc00f0 Merge branch '1.1.x' 2014-10-13 15:36:14 +01:00
Andy Wilkinson
7060cc1967 Correct the position of JNDI in the ordered list of property sources
Fixes gh-1693
2014-10-13 15:35:06 +01:00
Andy Wilkinson
4b9f14f55b Separate out the auto-configuration of Spring Data’s web support
Previously, Spring Data’s web support was auto-configured as part of the
JPA repositories auto-configuration. However, Spring Data’s web support
isn’t dependent on the use of Spring Data JPA or even repositories.

This commit moves the auto-configuration into a standalone class, making
it independent of the use of Spring Data JPA and Spring Data
repositories.

Closes gh-1097
2014-10-13 15:14:26 +01:00
Dave Syer
f9010c18cc Fix install command on Windows
Windows absolute paths cannot be processed by the CLI compiler, so the install
command wasn't working on Windows. This change converts ths path to a URI first
and then it works as a Spring Resource.
2014-10-13 13:57:22 +01:00
Andy Wilkinson
7211571969 Fix some grammar issues in docs
Closes gh-1695
2014-10-13 13:18:24 +01:00
Andy Wilkinson
4308d1112c Merge branch '1.1.x' 2014-10-13 13:11:38 +01:00
Eric Dahl
16937746a0 Fix some grammar issues in docs 2014-10-13 12:22:14 +01:00
Andy Wilkinson
2b7bf3e733 Fix ArrayStoreException caused by JerseyAutoConfiguration
JerseyAutoConfiguration is annotated with @ConditionalOnClass. It
references both SpringComponentProvider.class and
ServletRegistration.class. Normally, this wouldn't be a problem as, in
the absence of either of those classes, the configuration class bean
will not be present in the bean factory and, therefore, its
annotations will never be introspected using reflection.

However, JerseyAutoConfiguration is a WebApplicationInitializer. This
means that when it's deployed to a standalone container,
JerseyAutoConfiguration is found by the container and its class is
passed to SpringServletContainerInitializer.
SpringServletContainerInitializer introspects every
WebApplicationInitializer class so that it can order them. This blows
up if Jersey's SpringComponentProvider class isn't on the classpath as
the annotation is referencing SpringComponentProvider as a Class and
the attempt to load it fails. The problem can be avoided by
referencing SpringComponentProvider using a String.

Fixes gh-1696
2014-10-13 11:21:55 +01:00
Phillip Webb
c90633aab6 Polish 2014-10-10 17:27:26 -07:00
Phillip Webb
3228cfa9bd Fixup version numbers following release 2014-10-10 15:53:54 -07:00
Spring Buildmaster
3e71a21b30 Next development version 2014-10-10 15:19:47 -07:00
Phillip Webb
c40aab657f Don't import JmsBootstrapConfiguration directly
Remove the direct unconditional JmsBootstrapConfiguration @Import from
JmsAnnotationDrivenConfiguration in favor of the nested
EnableJmsConfiguration class.

Fixes gh-1513
2014-10-10 14:08:24 -07:00
Phillip Webb
517b40d9b9 Don't call close() on JNDI DataSource
Update the JNDI auto-configured DataSource so that the close method
isn't called when the ApplicationContext is closed.

Fixes gh-1520
2014-10-10 13:49:15 -07:00
Phillip Webb
a3527521a2 Also resolve favicon.ico from resource folders
Update FaviconConfiguration to allow favicon.ico files to be resolved
from static resource folders (/META-INF/resources, /resources, /static,
/public) in addition to the root classpath.

Fixes gh-1656
2014-10-10 13:09:30 -07:00
Phillip Webb
a1bcd70377 Merge pull request #1688 from mvitz/master
* pull1688:
  Remove superfluous maven-antrun-plugin
2014-10-10 12:11:30 -07:00
Michael Vitz
81cba1f2ff Remove superfluous maven-antrun-plugin
Remove the maven-antrun-plugin from the pluginManagement section of
spring-boot-starter-parent since it is already declared in the
spring-boot-dependencies POM.

Closes gh-1688
2014-10-10 12:09:38 -07:00
Phillip Webb
001f2d6c69 Improve performance of MessageSource condition
Update the MessageSourceAutoConfiguration condition to skip scanning for
well known JARs. Results are now also cached.

Fixes gh-1689
2014-10-10 11:48:12 -07:00
Phillip Webb
828efb2589 Add more skip patterns to SkipPatternJarScanner
Improve startup performance by skipping more JARs that we know don't
contain servlet files.

Fixes gh-1687
2014-10-10 11:48:12 -07:00
Phillip Webb
9a88b626f9 Use StandardJarScanFilter.setTldSkip on Tomcat 8
Update SkipPatternJarScanner to apply skipped JARs to Tomcat 8's
StandardJarScanFilter.

Fixes gh-1686
2014-10-10 11:48:12 -07:00
Phillip Webb
dca637f51f Replace @ConditionalOnExpression with OnProperty
Replace where possible all @ConditionalOnExpression annotations with
@ConditionalOnProperty which is both faster to run and more descriptive.

Fixes gh-1685
2014-10-10 11:48:05 -07:00
Phillip Webb
7b33f286f5 Remove unnecessary compiler configuration
The new `maven.compiler.source` and `maven.compiler.target` properties
have removed the need for explicit configuration.

Closes gh-1684
2014-10-10 11:10:18 -07:00
Phillip Webb
7956ab58a5 Add maven.compiler.source and target properties
Add `maven.compiler.source` and `maven.compiler.target` properties to
the spring-boot-starter-parent to allow easier customization of the
maven compiler. Both properties default to `${java.version}`.

Fixes gh-1684
2014-10-10 11:01:30 -07:00
Phillip Webb
b87a591d27 Revert "Add ActiveMQ MQTT connection URL auto-detection"
This reverts commit 0d8bde58c9.

Fixes gh-1679
2014-10-09 19:24:47 -07:00
Phillip Webb
509c3aef4e Merge branch '1.1.x' 2014-10-09 19:23:57 -07:00
Phillip Webb
6028d92a4e Support Windows UNC paths with fat jars
Update `Launcher` and `JarFile` to correctly deal with Windows UNC
paths.

Fixes gh-1641
2014-10-09 19:06:28 -07:00
Phillip Webb
30f8954b4a Add @since tag 2014-10-09 13:04:44 -07:00
Phillip Webb
187b4e706c Escape ...*... outputs using +...*...+ 2014-10-09 13:04:35 -07:00
Phillip Webb
6281070d0a Merge branch '1.1.x'
Conflicts:
	spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
2014-10-09 13:00:27 -07:00
Phillip Webb
6009f41782 Polish 2014-10-09 12:58:55 -07:00
Phillip Webb
7e842aee77 Escape ...*... outputs using +...*...+ 2014-10-09 12:41:39 -07:00