Commit Graph

461 Commits

Author SHA1 Message Date
Andy Wilkinson 186b3a66e3 Update WebSocket sample with new SockJS CDN
Closes gh-1740
2014-10-21 16:07:15 +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 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
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
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 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
Andy Wilkinson 07cb8f2836 Ensure that spring.data.rest.* configuration takes effect
Previously, RepositoryRestMvcBootConfiguration was not annotated with
@Configuration. This meant that it was processed in lite mode.
Crucially, in lite mode, there’s no proxying so each call to the
config() @Bean method from within other @Bean methods resulted in the
creation of a new RepositoryRestConfiguration instance. Furthermore, as
each of these instances wasn’t a Spring bean the configuration
properties were not applied.

This commit updates RepositoryRestMvcBootConfiguration to annotate it
with @Configuration so that it’s no longer processed in lite mode. It
also updates the unit tests and the Spring Data REST sample to verify
that the baseUri can be configured using application.properties.

Fixes gh-1675
2014-10-09 14:29:38 +01:00
Phillip Webb 4c51aa8e28 Polish 2014-10-08 11:34:11 -07:00
Andy Wilkinson 7287c66d88 Fix Actuator sample's health test 2014-10-08 18:58:34 +01:00
Daniel Fullarton 1dbc94d0f7 Add a logging system, starter and sample for Log4j 2
Closes gh-1565
2014-10-08 15:30:00 +01:00
Andy Wilkinson 8e000f3da1 Merge branch '1.1.x' 2014-10-08 15:13:52 +01:00
Andy Wilkinson b85926e6f0 Fix the rest of the typo InMemoryRepository's name 2014-10-08 15:13:25 +01:00
Andy Wilkinson b8759ebf69 Merge branch '1.1.x' 2014-10-08 14:48:26 +01:00
matzschmanski 02fef4295d Fix typo: InMemoryMessageRespository -> InMemoryMessageRepository
Closes gh-1671
2014-10-08 14:48:00 +01:00
Phillip Webb 62eb01f0b8 Polish 2014-10-06 12:03:51 -07:00
Phillip Webb 09d5812c3b Merge branch '1.1.x' 2014-10-06 11:07:28 -07:00
Phillip Webb b616e9fdc4 Rename SampleIntegrationApplicationTests 2014-10-06 10:47:40 -07:00
Dave Syer 64ef03aafd Fix Jersey1 integration test 2014-10-02 15:28:27 +01:00
Dave Syer 339f3b7bf0 Add autoconfig support for Jersey (2)
Jersey 2 has some Spring support built in but it's a bit awkward to
use in a Boot app, so autoconfiguration seems appropriate. The tests
and sample show how to use it, but the short story is that any
@Component can define JAX-RS endpoints via @GET etc.

There's a sample for Jersey 1 as well (pay careful attention to
the plugin configuration if you want to build an executable jar)

Fixes gh-1651
2014-10-02 11:22:00 +01:00
Manuel Doninger 02e33c125c Use reflection to load Hibernate version specific classes
This adds support for Hibernate 4.2 again by loading the specific
classes with reflection.

Fixes gh-1460, fixes gh-1557
2014-10-02 09:49:11 +01:00
Andy Wilkinson fcd855cd5e Merge branch '1.1.x' 2014-09-30 10:30:08 +01:00
Andy Wilkinson 61e90f5b6e Add tests to Data REST sample for search operations
Closes gh-1627
2014-09-30 10:29:38 +01:00
bangsen.yin b798d001d7 Add missing @Param annotations to CityRepository in Data REST sample
Without the @Param annotations, using either of the search URIs would
resulted in a 400 response and an error describing the lack of @Param
annotation.

See gh-1627
2014-09-30 10:18:26 +01:00
Phillip Webb 4f9258a345 Fixup version numbers following release 2014-09-25 21:37:40 -07:00
Spring Buildmaster edb4b7ed7d Next development version 2014-09-25 21:02:37 -07:00
Phillip Webb 0d0e5eb590 Merge branch '1.1.x' 2014-09-25 10:05:35 -07:00
Dave Syer 336b96b81c Copy server customization to management context
If the actuator endpoints are configured on a different port then there
are some settings in the main ServerProperties that we would like to
re-use (e.g. the access log). The easiest way to do that is to just
configure the management server using the same ServerProperties instance
and then overwrite the things that are different (and stored in
ManagementServerProperties).

Fixes gh-1581
2014-09-25 09:57:24 -07:00
Stéphane DERACO 68ff7d4592 Fix broken documentation links
Fix links to `actuator-noweb`, `actuator-log4j` and `hornetq` samples.

Fixes gh-1613
2014-09-25 09:47:07 -07:00
Phillip Webb 4f610fa5a1 Merge branch '1.1.x'
Conflicts:
	spring-boot-samples/spring-boot-sample-tomcat-ssl/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat-ssl/src/test/java/sample/tomcat/SampleTomcatSslApplicationTests.java
	spring-boot/src/main/java/org/springframework/boot/context/embedded/ConfigurableEmbeddedServletContainer.java
	spring-boot/src/main/java/org/springframework/boot/context/embedded/Ssl.java
2014-09-17 10:11:30 -07:00
Phillip Webb 62a5ce52d0 Backport Jetty/Tomcat SSL support
Fixes gh-1570
Cherry-picked from 0960908 and 258c6f1
2014-09-17 10:08:05 -07:00
Andy Wilkinson 5a160fbe5a Reinstate repository configuration in spring-boot-samples pom
The repository configuration is there in 1.1.x but missing in master.
This commit brings the two branches back into line.

Closes gh-1473
2014-09-15 17:48:01 +01:00
Dave Syer 389c4f3e0b Merge branch '1.1.x' 2014-09-13 06:44:03 -05:00
Dave Syer bf0c8fc8bb Remove JDBC from secure-web sample
Fixes gh-1534
2014-09-13 06:42:59 -05:00
Dave Syer 9902f98a3d Ensure the AuthenticationManager is created when needed
There was too much state really in the old implementation of
AuthenticationManagerConfiguration, and it was leading occasionally
to null pointers when method A assumed that method B had already
been called and it hadn't. This change manages to concentrate all the
references to an AuthenticationManagerBuilder into a single method
call, removoing the need for storing it at all.

Fixes gh-1556
2014-09-13 06:42:46 -05:00
Phillip Webb 338288205b Fixup version numbers following release 2014-09-04 15:40:55 -07:00
Spring Buildmaster d63e4b4329 Next development version 2014-09-04 12:15:18 -07:00
Dave Syer 73a5a8730b Fix versions in simple sample 2014-09-04 10:20:54 +01:00
Dave Syer fea9ee8faa Merge branch '1.1.x' 2014-09-04 08:51:51 +01:00
Dave Syer 8a66d50edf Remove binary files 2014-09-04 08:51:37 +01:00
Phillip Webb 6ee18fbabd Remove workaround for SPR-12118 2014-09-03 18:32:17 -07:00
Phillip Webb 6f62fc854b Merge branch '1.1.x' 2014-09-03 11:45:54 -07:00
Stephane Nicoll f46fe32264 Add group discriminant in case of conflict
Prior to this commit, the repackage goal silently ignored the case of
two libraries having the same name and version but a different group.
As a result, the second library was overwriting the first one in the
repackaged jar.

This commit adds support for custom Library names and updates the
Maven and Gradle plugins so that the name includes the group ID
when there would otherwise be a duplicate.

Fixes gh-1475
2014-09-03 11:22:53 -07:00
Phillip Webb 236026a43a Support mixed XA/non-XA ConnectionFactory beans
Update ActiveMQ and HornetQ XA configurations to also expose non-xa
ConnectionFactory variants.

Fixes gh-1461
2014-09-02 13:00:59 -07:00
Phillip Webb 104b724446 Fix Windows Atomikos/Bitronix ApplicationTests
Update SampleAtomikosApplicationTests and SampleBitronixApplicationTests
to not depend on any specific System.out order.

Fixes gh-1472
2014-09-01 17:46:52 -07:00
Andy Wilkinson a9c2eb3919 Update JTA sample tests to work on Windows
Rather than hard-coding assumptions about the line endings, use a
PrintWriter to produce the multi-line expected output
2014-08-27 11:42:21 +01:00
Josh Long 85cfd016a6 Add JNDI Sample
Add a sample application that can be deployed to WildFly to demonstrate
how JTA can be used when running in a application server.

See gh-947
2014-08-26 22:34:16 -07:00
Josh Long c15e3a7e2f Add Atomikos and Bitronix JTA samples
Add samples and integration tests for Atomikos and Bitronix JTA.

See gh-947
2014-08-26 22:34:04 -07:00
Dave Syer ef2898a2f9 Fix version in new sample 2014-08-26 14:38:03 +01:00
Dave Syer 3404850b2e Merge branch '1.1.x' 2014-08-26 09:19:38 +01:00
Dave Syer 95d65c2ff5 Add indirection to avoid runtime dependency on MVC in templates
Velocity and Freemarker share some common properties so the base class for
configuring their properties makes some sense. Unfortunately the implementation
pulls in Spring MVC at runtime because of the signature of one method (that
would never be called). We can fix that in a number of ways, but the least
disruptive is probably to change the signature of that method and only refer
to the concrete template view resolver type if the method is called.

Fixes gh-1437
2014-08-26 09:19:07 +01:00
Dave Syer 43de5f3df8 Bump version in new sample 2014-08-25 17:21:17 +01:00
Dave Syer 5fd9af23d6 Merge branch '1.1.x' 2014-08-25 17:18:36 +01:00
Dave Syer 607f78a779 Add secure sample with JDBC and data.sql
We can't easily solve the problem by not allowing Spring Security to
eagerly instantiate everything, but we can be defensive about data.sql
and make sure it is executed even if the listener isn't yet registered.

Fixes gh-1386
2014-08-25 17:16:32 +01:00
Phillip Webb 7d4fbacecd Fix invoker to not download remote artifacts
Updates to prevent the maven-invoker-plugin from downloading remote
snapshot jars. Possibly caused by the recent changes to the
spring-boot-dependencies POM.

See gh-1413
2014-08-21 00:52:00 -07:00
Phillip Webb 6634af6a25 Fix broken parent POM version
Update the parent POM version in spring-boot-sample-web-secure-custom
2014-08-12 13:45:19 -07:00
Dave Syer 300910f7d5 Merge branch '1.1.x' 2014-08-11 17:43:14 -07:00
Dave Syer 0cf1c6f0e5 Refactor AuthenticationManagerConfiguration to make sure it works
if user also adds @EnableWebMvcSecurity. The problem is that the ordering
of the init() and configure() methods in the Spring Security configurers
can force things to happen too early unless we are careful. It's still a bit
twitchy I would say, but this relatively small change seems to fix the GS guide
and not break any existing tests.

I added a sample which mimic ths GS guide so we get an integration test that
executes the new code paths.

Fixes gh-1364
2014-08-11 17:42:30 -07:00
Phillip Webb 7d0a3ddcce Rename VanillaHealthIndicator to Application...
Rename `VanillaHealthIndicator` to `ApplicationHealthIndicator` and
changed the exposed bean name from `statusHealthIndicator` to
`applicationHealthIndicator`.

This provides less confusing JSON output:

  {"status":"UP","application":{"status":"UP"}}

vs:

  {"status":"UP","status":{"status":"UP"}}

Fixes gh-1291
2014-08-11 09:04:01 -07:00
Phillip Webb 6b083d7e0b Merge branch '1.1.x'
Conflicts:
	pom.xml
	spring-boot-actuator/pom.xml
	spring-boot-autoconfigure/pom.xml
	spring-boot-cli/pom.xml
	spring-boot-dependencies/pom.xml
	spring-boot-docs/pom.xml
	spring-boot-full-build/pom.xml
	spring-boot-integration-tests/pom.xml
	spring-boot-parent/pom.xml
	spring-boot-samples/pom.xml
	spring-boot-samples/spring-boot-sample-actuator-log4j/pom.xml
	spring-boot-samples/spring-boot-sample-actuator-noweb/pom.xml
	spring-boot-samples/spring-boot-sample-actuator-ui/pom.xml
	spring-boot-samples/spring-boot-sample-actuator/pom.xml
	spring-boot-samples/spring-boot-sample-amqp/pom.xml
	spring-boot-samples/spring-boot-sample-aop/pom.xml
	spring-boot-samples/spring-boot-sample-batch/pom.xml
	spring-boot-samples/spring-boot-sample-data-elasticsearch/pom.xml
	spring-boot-samples/spring-boot-sample-data-gemfire/pom.xml
	spring-boot-samples/spring-boot-sample-data-jpa/pom.xml
	spring-boot-samples/spring-boot-sample-data-mongodb/pom.xml
	spring-boot-samples/spring-boot-sample-data-redis/pom.xml
	spring-boot-samples/spring-boot-sample-data-rest/pom.xml
	spring-boot-samples/spring-boot-sample-data-solr/pom.xml
	spring-boot-samples/spring-boot-sample-flyway/pom.xml
	spring-boot-samples/spring-boot-sample-hornetq/pom.xml
	spring-boot-samples/spring-boot-sample-integration/pom.xml
	spring-boot-samples/spring-boot-sample-jetty/pom.xml
	spring-boot-samples/spring-boot-sample-liquibase/pom.xml
	spring-boot-samples/spring-boot-sample-parent-context/pom.xml
	spring-boot-samples/spring-boot-sample-profile/pom.xml
	spring-boot-samples/spring-boot-sample-secure/pom.xml
	spring-boot-samples/spring-boot-sample-servlet/pom.xml
	spring-boot-samples/spring-boot-sample-simple/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat-multi-connectors/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat8-jsp/pom.xml
	spring-boot-samples/spring-boot-sample-traditional/pom.xml
	spring-boot-samples/spring-boot-sample-web-freemarker/pom.xml
	spring-boot-samples/spring-boot-sample-web-groovy-templates/pom.xml
	spring-boot-samples/spring-boot-sample-web-jsp/pom.xml
	spring-boot-samples/spring-boot-sample-web-method-security/pom.xml
	spring-boot-samples/spring-boot-sample-web-secure/pom.xml
	spring-boot-samples/spring-boot-sample-web-static/pom.xml
	spring-boot-samples/spring-boot-sample-web-ui/pom.xml
	spring-boot-samples/spring-boot-sample-web-velocity/pom.xml
	spring-boot-samples/spring-boot-sample-websocket/pom.xml
	spring-boot-samples/spring-boot-sample-ws/pom.xml
	spring-boot-samples/spring-boot-sample-xml/pom.xml
	spring-boot-starters/pom.xml
	spring-boot-starters/spring-boot-starter-actuator/pom.xml
	spring-boot-starters/spring-boot-starter-amqp/pom.xml
	spring-boot-starters/spring-boot-starter-aop/pom.xml
	spring-boot-starters/spring-boot-starter-batch/pom.xml
	spring-boot-starters/spring-boot-starter-data-elasticsearch/pom.xml
	spring-boot-starters/spring-boot-starter-data-gemfire/pom.xml
	spring-boot-starters/spring-boot-starter-data-jpa/pom.xml
	spring-boot-starters/spring-boot-starter-data-mongodb/pom.xml
	spring-boot-starters/spring-boot-starter-data-rest/pom.xml
	spring-boot-starters/spring-boot-starter-data-solr/pom.xml
	spring-boot-starters/spring-boot-starter-freemarker/pom.xml
	spring-boot-starters/spring-boot-starter-groovy-templates/pom.xml
	spring-boot-starters/spring-boot-starter-hornetq/pom.xml
	spring-boot-starters/spring-boot-starter-integration/pom.xml
	spring-boot-starters/spring-boot-starter-jdbc/pom.xml
	spring-boot-starters/spring-boot-starter-jetty/pom.xml
	spring-boot-starters/spring-boot-starter-log4j/pom.xml
	spring-boot-starters/spring-boot-starter-logging/pom.xml
	spring-boot-starters/spring-boot-starter-mobile/pom.xml
	spring-boot-starters/spring-boot-starter-parent/pom.xml
	spring-boot-starters/spring-boot-starter-redis/pom.xml
	spring-boot-starters/spring-boot-starter-remote-shell/pom.xml
	spring-boot-starters/spring-boot-starter-security/pom.xml
	spring-boot-starters/spring-boot-starter-social-facebook/pom.xml
	spring-boot-starters/spring-boot-starter-social-linkedin/pom.xml
	spring-boot-starters/spring-boot-starter-social-twitter/pom.xml
	spring-boot-starters/spring-boot-starter-test/pom.xml
	spring-boot-starters/spring-boot-starter-thymeleaf/pom.xml
	spring-boot-starters/spring-boot-starter-tomcat/pom.xml
	spring-boot-starters/spring-boot-starter-velocity/pom.xml
	spring-boot-starters/spring-boot-starter-web/pom.xml
	spring-boot-starters/spring-boot-starter-websocket/pom.xml
	spring-boot-starters/spring-boot-starter-ws/pom.xml
	spring-boot-starters/spring-boot-starter/pom.xml
	spring-boot-tools/pom.xml
	spring-boot-tools/spring-boot-dependency-tools/pom.xml
	spring-boot-tools/spring-boot-gradle-plugin/pom.xml
	spring-boot-tools/spring-boot-loader-tools/pom.xml
	spring-boot-tools/spring-boot-loader/pom.xml
	spring-boot-tools/spring-boot-maven-plugin/pom.xml
	spring-boot-versions/pom.xml
	spring-boot/pom.xml
2014-08-07 13:16:27 -07:00
Phillip Webb cac3865ffa Fixup version numbers following release 2014-08-07 13:11:16 -07:00
Spring Buildmaster 74d0c5185a Next development version 2014-08-07 11:59:17 -07:00
Dave Syer 178386abc4 Merge branch '1.1.x' 2014-08-06 19:33:57 -07:00
Dave Syer 38f8d65756 Use ApplicationEvent to ensure that authentication event publisher is registered
There was a reference to an old (fixed) issue in Spring which led to some simplification
of the AuthenticationManager layering as well.

Fixes gh-1335
2014-08-06 19:30:27 -07:00
Andy Wilkinson 7f9ef1cf5b Merge branch '1.1.x' 2014-08-06 14:01:36 +01:00
Andy Wilkinson e185793396 Update test to correct name of metric for request that returns a 401
The request is being made to '/' and, while the application does have
a mapping for '/', that mapping is not looked for before Spring
Security's filter rejects the request with a 401. This means that the
request is considered to be unmapped and this is reflected in the
metric's name.

See #1331 and #1333
2014-08-06 13:38:42 +01:00
Phillip Webb da5c36c3a9 Polish 2014-07-29 13:06:47 -07:00
Andy Wilkinson 0960908bd7 Add support for configuring SSL declaratively
Both Tomcat and Jetty can now be configured to use SSL via the
environment (typically application.properties or application.yml)

Closes #1084
2014-07-24 15:10:09 +01:00
Andy Wilkinson d04f325294 Merge branch '1.1.x' 2014-07-23 15:57:53 +01:00
Andy Wilkinson 7945b29669 Correct the descriptions of two sample projects 2014-07-23 15:57:44 +01:00
Stephane Nicoll 249e09d9bc Switch master to 1.2.0.BUILD-SNAPSHOT 2014-07-11 10:44:05 +02:00
Phillip Webb 3c7d825658 Fixup version numbers following release 2014-07-08 03:07:03 -07:00
Spring Buildmaster 40327e1ae6 Next development version 2014-07-08 02:33:36 -07:00
Dave Syer 3978700b4a More specific pointcut to be safe 2014-07-07 08:24:34 +01:00
Phillip Webb 8054426803 Format source code 2014-07-02 15:17:25 -07:00
Phillip Webb fa88c481a5 Remote trailing whitespace 2014-07-02 15:17:14 -07:00
Dave Syer fd757cb371 Add logging.level to application.properties
E.g.

logging.level.org.springframework: DEBUG
logging.level.org.hibernate: WARN

Fixed gh-788
2014-06-27 15:49:17 +01:00
Phillip Webb cc61d92b88 Fixup build following release 2014-06-27 07:00:57 -07:00
Spring Buildmaster 981669b7c0 Next development version 2014-06-26 14:09:54 -07:00
Phillip Webb 200cd535c2 Revert "Next development version"
This reverts commit 67189477fe.
2014-06-26 11:03:09 -07:00
Spring Buildmaster 67189477fe Next development version 2014-06-26 10:51:35 -07:00
Phillip Webb 9632abf825 Formatting and cleanup 2014-06-26 09:41:15 -07:00
Phillip Webb e220f0806a Attempt to fix Windows CI 2014-06-25 17:25:31 -07:00
Phillip Webb 8be3f33cfb Be defensive detecting when Mono not running 2014-06-25 17:05:28 -07:00
Dave Syer b0bf9c776f Fix logic error in ErrorPageFilter (fixes gh-1149) 2014-06-25 08:47:24 +01:00
Phillip Webb 91bbd20ca0 Fixup version numbers following release 2014-06-24 14:53:08 -07:00
Spring Buildmaster 542f3cbda8 Next development version 2014-06-24 13:53:56 -07:00
Dave Syer 542896b28f Support for non-executable JAR in addition to the repackaged one
Stretches the Gradle boot plugin a bit, so there's a sample build
in the "profile" sample. Howto docs give examples.

Fixes gh-1135
2014-06-23 11:08:58 +01:00
Dave Syer 772df9bea7 Add inputs to gradle bootRepackage task
See gh-1113
2014-06-20 22:25:11 +01:00
Phillip Webb a2efe17fc9 Polish 2014-06-18 16:30:22 -07:00
Phillip Webb 179e1558f6 Polish 2014-06-18 12:48:42 -07:00
Dave Syer f8e847a6fc Change ordering of DataSourceInitializer a bit
It needs to run as soon as the DataSource is available really otherwise
anything else that depends on the DataSource (like Security JDBC
initializers) might fail when it tries to use it.

One change from 1.1.1 is that if you have a schema.sql you had better
make sure your data.sql talks to the same tables. In 1.1.1 you could
sometimes get away with letting Hibernate initialize the tables for
your data.sql and *also* have a schema.sql. This was fragile and doomed
to fail eventually if the DataSourceInitializer somehow got
initialized earlier (e.g. through a @DependsOn), so in the spririt
of honesty being the best policy we explicitly disallow it now.

Fixes gh-1115
2014-06-18 15:19:53 +01:00
Dave Syer 7fc1f19389 Fix WS sample to use a random port 2014-06-18 12:48:26 +01:00
Dave Syer e39fafcc33 Add JDBC user details to web-secure sample
See gh-1115
2014-06-18 12:48:26 +01:00
Dave Syer 18d8c4a8d9 Add additional samples to README
Fixes gh-1068
2014-06-17 11:28:34 +01:00
Dave Syer 2f12dc823c Remove workaround for bug they fixed in Groovy 2014-06-13 14:24:17 +01:00
Phillip Webb 143e1918b7 Fixup versions following release 2014-06-11 12:16:08 -07:00
Spring Buildmaster 4ca26a21dc Next development version 2014-06-11 10:46:27 -07:00