Commit Graph

486 Commits

Author SHA1 Message Date
Andy Wilkinson
f0421801fb Update spring-boot-sample-tomcat-jsp to use Tomcat 8
Closes gh-2394
2015-01-22 11:09:19 +00:00
Andy Wilkinson
247c596f8c Remove duplicate console appender from Actuator sample's logback config
Closes gh-2381
2015-01-20 11:44:23 +00:00
Andy Wilkinson
1d312171c1 Merge branch '1.1.x' 2015-01-20 09:50:47 +00:00
Andy Wilkinson
f10c9b5312 Avoid race between file creation and its contents being written
Previously, SampleIntegrationParentApplicationTests assumed that when
an output file existed on disk its contents would have been written
in their entirety. This assumption does not hold true and causes the
test to fail intermittently as it incorrectly determines that the test
has produced no output.

This commit updates the test to wait for up to 30 seconds for the
output files to appear on disk and for the expected content to be
found in one of those files. If the files exist but do not
contain the expected content the test will keep trying until it does
or until too much time as elapsed.

Fixes gh-2380
2015-01-20 09:50:35 +00:00
Andy Wilkinson
e19bfd9251 Document how to use Tomcat 7 or Jetty 8 with Gradle
Previously, the documentation only provided examples of the required
configuration for Maven users. This commit adds equivalent configuration
snippets for those using Gradle. It also removes the recommendation to
override the version of the Servlet API as this is unnecessary. The pom
files for the Jetty 8 and Tomcat 7 samples have also been updated
accordingly.

Closes gh-2346
2015-01-19 14:20:30 +00:00
Andy Wilkinson
ff2d423fcb Correct the root context path used with Undertow
Undertow, like Tomcat, uses "" for the context path of the root
context. Previously, the Undertow deployment was being configured with
"/" for the root context. This was leading to a silent failure in
AsyncContextImpl.dispatch when it failed to look up the deployment
manager for the current request.

This commit updates UndertowEmbeddedServletContainerFactory to use the
correct context path (an empty String) for the root context.

Fixes gh-2365
2015-01-16 13:38:13 +00:00
Andy Wilkinson
492cf4ef54 Add jersey-bean-validation to spring-boot-starter-jersey
A dependency on org.glassfish.jersey.ext:jersey-bean-validation has
been added to spring-boot-starter-jersey. jersey-bean-validation’s EL
dependencies have been excluded in favour of those provided by
spring-boot-starter-tomcat (or starter-jetty or starter-undertow should
the user choose to use a different embedded container).

Closes gh-2315
2015-01-15 09:50:05 +00:00
Phillip Webb
43d577aa4c Add Atmosphere sample application
Add Atmosphere example application based on
http://github.com/Atmosphere/atmosphere-samples/tree/master/samples/chat

Closes gh-2341
2015-01-13 15:42:14 -08:00
izeye
4e109caf5c Fix copy/paste errors
Closes gh-2323
2015-01-12 10:10:10 +01:00
Dave Syer
2729c747ca Add jmustache support
The package names changed a bit from the prototype project, but wuth vanilla
autconfiguration usage that shouldn't matter. Follows closely the Groovy
templates support. Templates live in classpath:/templates/*.html by default.

Fixes gh-2242
2015-01-09 13:50:39 +00:00
Phillip Webb
9dd4d43cec Fixup version numbers following release 2015-01-08 00:19:04 -08:00
Spring Buildmaster
60725cd8bd Next development version 2015-01-07 23:37:07 -08:00
Phillip Webb
978cf8c2e6 Polish @WebIntegrationTest support
See gh-2299
2015-01-07 14:07:28 -08:00
Phillip Webb
f9c3baed33 Add TestNG sample application
Add a TestNG sample that also demonstrates @WebIntegrationTest.

See gh-2135
2015-01-06 21:03:56 -08:00
Phillip Webb
98135c964b Remove Principal handler logic from security
Update ManagementSecurityAutoConfiguration so that MVC Endpoints that
have Principal arguments are not treated in any special way. This
restores Spring Boot 1.1.x behavior where the 'sensitive' flag is used
to determine access rules.

The HealthMvcEndpoint still uses the Principal (when available) to
determine if full status information can be displayed. It now also
explicitly checks the environment for `endpoints.health.sensitive`
to determine if the user has opted-out and requires complete health
details.

The health MVC endpoint should now work as follows:

* Default configuration - No login is required, full information is only
  displayed if a Principal is available.
* endpoints.health.sensitive=true - Login is required, full information
  is displayed.
* endpoints.health.sensitive=false - Login is not required, full
  information is displayed.

Fixes gh-2211
2014-12-25 12:42:45 -08:00
Phillip Webb
ea84479e9a Fix HATEOAS sample application version number 2014-12-22 20:29:18 -08:00
Phillip Webb
4ed42aac37 Merge branch '1.1.x' 2014-12-22 20:29:11 -08:00
Phillip Webb
7d017a2a6b Add HATEOAS sample application 2014-12-22 20:28:15 -08:00
Phillip Webb
425f989a26 Polish velocity sample POM name 2014-12-19 16:06:31 -08:00
Phillip Webb
5afd0b4858 Polish sample POM names 2014-12-19 15:59:44 -08:00
Phillip Webb
8fd99bde8b Update samples to use specific log configuration 2014-12-17 11:33:29 -08:00
Phillip Webb
a6adeab319 Fixup version numbers following release 2014-12-10 19:50:05 -08:00
Phillip Webb
43fb5b63a8 Fixup version numbers following release 2014-12-10 19:49:23 -08:00
Spring Buildmaster
63e6a25097 Next development version 2014-12-10 18:06:30 -08:00
Spring Buildmaster
1a788c1741 Next development version 2014-12-10 16:35:50 -08:00
Phillip Webb
a69afa0dca Support ServletContextListener with Jetty 9
Call `context.getServletContext().setExtendedListenerTypes(true)` to
ensure that ServletContextListeners can be registered with Jetty 9.

Fixes gh-2058
2014-12-09 09:20:55 -08:00
Phillip Webb
6e0f1f3d98 Use wesocket dependency from Undertow starter 2014-12-08 08:45:41 -08:00
Dave Syer
79aa6e7713 Add undertow websockets dependency 2014-12-08 09:20:24 +00:00
Phillip Webb
c22aee9817 Polish WebSocket samples 2014-12-03 16:23:15 -08:00
Phillip Webb
8928012943 Add Undertow WebSocket sample application
See gh-2028
2014-12-03 15:41:36 -08:00
Phillip Webb
5f2b60eff2 Polish POM 2014-12-03 14:19:08 -08:00
Phillip Webb
48db5457f1 Polish 2014-12-01 19:32:05 -08:00
Dave Syer
998c29c4aa Add java.version to Tomcat WAR projects 2014-12-01 13:40:53 +00:00
Dave Syer
3c1e48c89a Better handling of anonymously accessible endpoints
Shares the /health endpoint request mapping between security config
and MVC dispatcher. Generalizes so that instead of a marker
interface (AnonymouslyAccessibleMvcEndpoint), an MvcEndpoint
signals that it wants to control its own access rules by adding
a Principal to the @RequestMapping method parameters (more @MVC).

Fixes gh-2015 slightly differently
2014-11-28 06:33:30 +00:00
Andy Wilkinson
2ce057ca96 Allow /health to be accessed anonymously irresepctive of its sensitivity
The changes in 3bb598a overload the health endpoint's sensitive
property such that it's now considered sensitive if management
security is enabled. When an endpoint is sensitive anonymous
access is prevented. This breaks the health endpoint which should
return a filtered view of the server's health when it's accessed
anonymously rather than rejecting the request.

This commit introduces AnonymouslyAccessibleMvcEndpoint, a marker
extension of the MvcEndpoint interface. It is implemented by
HealthMvcEndpoint. ManagementSecurityAutoConfiguration has been
updated to allow anonymous access to endpoints that aren't sensitive
or that implement AnonymouslyAccessibleMvcEndpoint.

Fixes gh-2015
2014-11-27 14:51:57 +00:00
Andy Wilkinson
6d97785030 Add a plain JPA sample application
Closes gh-1761
2014-11-25 10:23:32 +00:00
Andy Wilkinson
5b671847d3 Merge branch '1.1.x' 2014-11-24 10:56:31 +00:00
Andy Wilkinson
ccbc606dad Use relative paths so index is unaffected by its context path
Previously, index.html used absolute paths to load its CSS and
JavaScript. This meant that it had to be deployed to /. This commit
updates the HTML to use relative paths for its CSS and JavaScript,
thereby ensuring that they can be loaded irrespective of the context
path to which the application is deployed.

Closes gh-1988
2014-11-24 10:55:37 +00:00
Dave Syer
f21d58ada7 Use constructor injection for Jersey sample 2014-11-23 07:27:49 +00:00
Dave Syer
9f7bd0cddc Inject ResourceConfig instance (not class) into Jersey
If you inject the class (via a servlet parameter) it seems that
Jersey tries to create all the beans for you (and fails). I thought
it was supposed to work (according to the docs), so I'm a bit confused
but the sample now has Spring DI and the tests pass.

Fixes gh-1981
2014-11-22 17:17:53 +00:00
Phillip Webb
670ba33bec Improve MongoDataAutoConfiguration
Update MongoDataAutoConfiguration to provide easier configuration of
CustomConversions, the MappingMongoConverter, MongoMappingContext
and an authentication database.

Fixes gh-1619
Fixes gh-1730
2014-11-20 14:55:19 -08:00
Andy Wilkinson
90af8bf54a Add auto-configuration for Jetty 9's WebSocket support
Closes gh-1269
2014-11-19 14:44:54 +00:00
Dave Syer
6ad626de49 Allows /configprops endpoint to show nested properties
Including maps and lists. Beans with no metadata (in
/META-INF/*spring-configuration-metadata.json) are just serialized
as they come (so might have problems like cycles). Serialization
errors are caught and rendered as an "error" for that bean. Any
problems can be fixed by preparing metadata and specifying which
properties are to be rendered that way.

Fixes gh-1746, fixes gh-1921
2014-11-19 14:10:01 +00:00
Phillip Webb
a641f0c72a Polish 2014-11-18 15:45:14 -08:00
Andy Wilkinson
7a783f5a18 Merge branch '1.1.x' 2014-11-18 21:31:19 +00:00
Andy Wilkinson
863c099161 Add missing copyright headers 2014-11-18 21:29:54 +00:00
Andy Wilkinson
1864d79077 Polish Undertow contribution
Closes gh-1779
2014-11-18 21:20:34 +00:00
sopov.ivan
c501b889af Add support for using Undertow as an embedded container
See gh-1779
2014-11-18 21:20:34 +00:00
Phillip Webb
21115f29cf Remove accidental SampleControllerAdvice test
Accidentally committed in 4668f59723

See gh-1950
2014-11-18 12:45:53 -08:00
Phillip Webb
4668f59723 Improve relaxed enum binding
Update RelaxedConversionService to support more relaxed enum binding.

Fixes gh-1950
2014-11-18 11:24:32 -08:00