Commit Graph

3711 Commits

Author SHA1 Message Date
Dave Syer 015377f9de Exclude log4j in a couple of places (see gh-1660)
also rename spring-cloud starter
2014-10-28 15:57:14 +00:00
Andy Wilkinson 0b116a1a5a Increase the level of JUL logging calls in the tests to try to fix CI
The CI build is failing, but, for some reason, the same tests are
working fine on developer machines. This commit increases the level
at which the logging calls are being made to severe in the hope that
some CI-specific configuration is filtering out the calls when
they're at info level.
2014-10-28 15:54:17 +00:00
Christian Dupuis 6c66ff78c0 Fix health status aggregation bug 2014-10-28 15:47:27 +01:00
Andy Wilkinson cebfd44d16 Upgrade to Spring AMQP 1.4.0.RC1 2014-10-28 13:49:52 +00:00
Andy Wilkinson bd562c06b6 Merge branch '1.1.x' 2014-10-28 11:06:23 +00:00
Andy Wilkinson f58b8366e1 Correct the syntax that's used for smart single and double quotes
Fixes gh-1753
2014-10-28 11:03:35 +00:00
Dave Syer aec38566ea Simplify logic for locating default logging config
Fixes gh-1612, Fixes gh-1770
2014-10-28 09:57:53 +00:00
David Liu 11c1e5ed6b add for log4j2 2014-10-28 09:57:53 +00:00
David Liu f9566ed30f spring-boot-1612: make console and file output configurable
1 disable the file output unless LOG_FILE is set
2 make the console optional

fixes: gh-1612
2014-10-28 09:57:53 +00:00
Andy Wilkinson ba40f13370 Update expectation to match response from anonymous access to /health 2014-10-28 09:39:40 +00:00
Dave Syer 1c4650f3ce Add Gitter badge 2014-10-28 08:27:01 +00:00
Dave Syer 9fce630c86 Extract lists in VCAP_APPLICATION (e.g. uris)
Fixes gh-1773
2014-10-28 08:14:00 +00:00
Dave Syer 6c3d490c74 Add note about springloaded configuration 2014-10-27 17:22:35 +00:00
Dave Syer 24e71e868f Allow /health and /info to authenticate anonymously
Then we can optionally find a non-anonymous principal if there
is one. If the user is anonymous then the health result is cached
up to endpoints.health.ttl (default 1000ms) to prevent a DOS attack.

Fixes gh-1353
2014-10-27 16:58:01 +00:00
Andy Wilkinson 43eda4ce5d Upgrade to Spring Integration 4.1.0.RC1
Closes gh-1765
2014-10-27 15:07:23 +00:00
Dave Syer f39d4978c3 Fix tests for JSON error rendering
See gh-1762
2014-10-27 15:06:32 +00:00
Dave Syer 4cd3bf18e0 Revert "Updated liquibase dependency to 3.2."
This reverts commit d6621e62ad. I think
the test failure might be a bug in Liquibase:
https://liquibase.jira.com/browse/CORE-2094
2014-10-27 14:43:00 +00:00
Nathan Voxland d6621e62ad Updated liquibase dependency to 3.2.
Fixes gh-1382
2014-10-27 11:49:33 +00:00
Dave Syer 576f5cfb06 Upgrade Jersey to 2.13
Fixes gh-1752
2014-10-27 11:09:02 +00:00
Dave Syer 254ab55476 Re-arrange priority of error message 2014-10-27 11:08:53 +00:00
Dave Syer 7bac7370c8 Use request attribute if available for error message
Fixes gh-1762, gh-1731
2014-10-27 10:50:10 +00:00
Dave Syer e8b59b9e55 Add CLI command line arguments examples 2014-10-27 08:11:53 +00:00
Stephane Nicoll e858cfcced Add missing starters in documentation 2014-10-24 13:58:15 +02:00
Domingo Suarez Torres 73c2862901 Add Jade4J Starter to the starters README
Closes gh-1748
Closes gh-1703
2014-10-23 10:39:58 +01:00
Andy Wilkinson a54c75bb9d Merge branch '1.1.x' 2014-10-22 13:44:39 +01:00
Andy Wilkinson ae503c62d2 Upgrade to 2.1.11 of the Git commit Maven plugin
Closes gh-1708
2014-10-22 13:33:48 +01:00
Andy Wilkinson cf0018e88c Merge branch '1.1.x' 2014-10-22 12:42:10 +01:00
Andy Wilkinson 5e5e707945 Upgrade to Reactor 1.1.5.RELEASE
Closes gh-1742
2014-10-22 12:38:55 +01:00
Phillip Webb 24f95b975d Rework @TestPropertySource compatibility
Rework @TestPropertySource changes introduced in commit d251b513
to restore compatibility with Spring Boot 1.1

- Only add the `server.port` property when no @IntegrationTest
  annotation is found.
- Always add a default `spring.jmx.enabled=false` property.
- Restore the SpringApplicationContextLoader.getEnvironmentProperties
  protected method.
- Remove the @IntegrationTest.properties attribute.

See gh-1697
2014-10-21 20:34:24 -07:00
Phillip Webb 2e7aa4685b Polish 2014-10-21 20:34:00 -07:00
Phillip Webb d1ce83e3c3 Merge branch '1.1.x' 2014-10-21 13:14:50 -07:00
Phillip Webb 41b2e58476 Polish 2014-10-21 13:13:39 -07:00
Stephane Nicoll d2198c417d Fix ConnectionFactory auto-configuration with XA
Previously, the regular jms connection factory was always overriding
the xaConnectionFactory when using ActiveMQ. While
ActiveMQAutoConfiguration is namely shielded with a condition on a
missing ConnectionFactory bean, said configuration class also imports the
XA and regular configuration classes that both can create the connection
factory.

This commit adds a ConditionalOnMissingBean in the second class that is
imported in case the XA configuration has already defined what it needs.

Fixes gh-1727
2014-10-21 18:28:26 +02:00
Andy Wilkinson 47285f9f02 Merge branch '1.1.x' 2014-10-21 16:08:31 +01:00
Andy Wilkinson 186b3a66e3 Update WebSocket sample with new SockJS CDN
Closes gh-1740
2014-10-21 16:07:15 +01:00
Andy Wilkinson c347972729 Install SLF4JBridgeHandler when Log4J2LoggingSystem is initialized
Previously, Log4J2LoggingSystem did not install SLF4JBridgeHandler.
SLF4JBridgeHandler is used to route logging calls made using
java.util.logging into SLF4J. This resulted in entries being written
to System.err instead.

This commit updates Log4J2LoggingSystem to register the bridge handler
thereby ensuring the logging that originates into java.util.logging is
routed into SLF4J. This change has been made by extracting a new
abstract superclass that performs the registration. This super class is
extended by all SLF4J-based LoggingSystem implementations.

Fixes gh-1737
2014-10-20 16:03:22 +01:00
Andy Wilkinson 6b1f76ad6b Merge branch '1.1.x' 2014-10-20 11:20:56 +01:00
Andy Wilkinson 160d609bd4 Protect against race condition where output file exists but it is empty
Previously, there was a timing window where the output file had been
created but it was empty. This would cause the test to fail as the
output was read from the empty file and didn’t match the expected “Hello
World”.

This commit updates the test to only process the resources in the output
directory when all the resolved resources have a non-zero content
length. An @Before method has also been added to delete the output
produced by the test so that the outcome of the test isn’t affected by
files generated by previous runs.

Fixes gh-1735
2014-10-20 11:04:14 +01:00
Andy Wilkinson 31874090b8 Fix ArrayStoreException caused by JerseyAutoConfiguration again
This is a follow-on from the changes made in 2b7bf3e. In addition to the
problematic use of @ConditionalOnClass that was addressed in 2b7bf3e,
JerseyAutoConfiguration also used @ConditionalOnBean referencing a 
Jersey class. This has the same problem when used on a class that
implements WebApplicationInitializer. Implementing
WebApplicationInitializer causes the class’s annotations to be
introspected during servlet container initialiser processing. If a
@ConditionalOnBean annotation references a Class that cannot be
loaded an ArrayStoreException occurs.

This commit updates JerseyAutoConfiguration to reference ResourceConfig
as a String. This allows it annotations to be introspected without
attempting to load a Jersey class that may not be on the classpath.

Fixes gh-1733
Fixes gh-1719
2014-10-20 10:14:53 +01:00
Brett Wooldridge 9984939c47 Update HikariCP to 2.1.0, compile against the Java 6-compatible artifact
For those running applications on Java 8, dependency management for the
Java 8-compatible artifact is also provided.

Closes gh-1721
2014-10-16 15:21:57 +01:00
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