spring-boot/spring-boot-samples
Andy Wilkinson ce541bebcf Align BasicErrorController’s HTML response status with non-HTML status
Previously, BasicErrorController would return the response status
set in the javax.servlet.error.status_code request attribute when
serving JSON but would also return a 200 OK response when serving
HTML. This didn’t cause much trouble when a person was browsing, but
proved problematic for machine clients that request text/html and care
about the response status. For example, the success handler would be
driven for an XHR request even though the response was really an error.

This commit updates BasicErrorController to set the response status for
text/html responses to match the status that it would use in an
application/json response.

Closes gh-4694
2015-12-10 13:40:16 +00:00
..
spring-boot-sample-actuator Fixup version numbers following release 2015-11-01 17:02:35 +01:00
spring-boot-sample-actuator-log4j Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-actuator-log4j2 Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-actuator-noweb Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-actuator-ui Align BasicErrorController’s HTML response status with non-HTML status 2015-12-10 13:40:16 +00:00
spring-boot-sample-amqp Next Development Version 2015-10-16 05:57:24 -07:00
spring-boot-sample-aop Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-atmosphere Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-batch Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-data-elasticsearch Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-data-gemfire Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-data-jpa Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-data-mongodb Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-data-redis Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-data-rest Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-data-solr Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-flyway Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-hateoas Ensure that HATEOAS sample does not try to produce XML 2015-10-30 09:17:34 +00:00
spring-boot-sample-hornetq Next Development Version 2015-10-16 05:57:24 -07:00
spring-boot-sample-integration Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jersey Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jersey1 Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jetty Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jetty8 Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jetty8-ssl Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jetty-ssl Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jpa Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jta-atomikos Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jta-bitronix Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-jta-jndi Next Development Version 2015-10-16 05:57:24 -07:00
spring-boot-sample-liquibase Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-parent-context Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-profile Fixup version numbers following release 2015-11-01 17:02:35 +01:00
spring-boot-sample-secure Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-servlet Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-simple Fixup version numbers following release 2015-11-01 17:02:35 +01:00
spring-boot-sample-testng Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-tomcat Remove unused test.css from spring-boot-sample-tomcat 2015-12-03 11:10:15 +00:00
spring-boot-sample-tomcat7-jsp Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-tomcat-jsp Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-tomcat-multi-connectors Update Tomcat multi-connectors sample to configure SSL declaratively 2015-10-30 09:05:24 +00:00
spring-boot-sample-tomcat-ssl Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-traditional Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-undertow Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-undertow-ssl Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-velocity Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-war Next Development Version 2015-10-16 05:57:24 -07:00
spring-boot-sample-web-freemarker Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-web-groovy-templates Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-web-jsp Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-web-method-security Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-web-mustache Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-web-secure Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-web-secure-custom Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-web-secure-jdbc Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-web-static Fixup version numbers following release 2015-11-01 17:02:35 +01:00
spring-boot-sample-web-ui Fixup version numbers following release 2015-11-01 17:02:35 +01:00
spring-boot-sample-web-velocity Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-websocket-jetty Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-websocket-tomcat Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-websocket-undertow Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-ws Organize imports with new settings 2015-10-19 12:55:44 -07:00
spring-boot-sample-xml Organize imports with new settings 2015-10-19 12:55:44 -07:00
pom.xml Next Development Version 2015-10-16 05:57:24 -07:00
README.adoc Fix broken documentation links 2014-09-25 09:47:07 -07:00

 The following java samples are provided:

* link:spring-boot-sample-simple[spring-boot-sample-simple]
  -- A simple command line application
* link:spring-boot-sample-tomcat[spring-boot-sample-tomcat]
  --  Embedded Tomcat
* link:spring-boot-sample-jetty[spring-boot-sample-jetty]
  -- Embedded Jetty
* link:spring-boot-sample-actuator[spring-boot-sample-actuator]
  -- Simple REST service with production features
* link:spring-boot-sample-actuator-ui[spring-boot-sample-actuator-ui]
  -- A web UI example with production features
* link:spring-boot-sample-actuator-noweb[spring-boot-sample-actuator-noweb]
  -- A production features sample with no web application
* link:spring-boot-sample-actuator-log4j[spring-boot-sample-actuator-log4j]
  -- A production features sample using log4j for logging (instead of logback)
* link:spring-boot-sample-web-ui[spring-boot-sample-web-ui]
  -- A thymeleaf web application
* link:spring-boot-sample-web-static[spring-boot-sample-web-static]
  -- A web application serving static files
* link:spring-boot-sample-web-freemarker[spring-boot-sample-web-freemarker]
  -- A web application using Freemarker templates
* link:spring-boot-sample-web-velocity[spring-boot-sample-web-velocity]
  -- A web application using Velocity templates
* link:spring-boot-sample-web-groovy-templates[spring-boot-sample-web-groovy-templates]
  -- A web application using native Groovy templates
* link:spring-boot-sample-web-jsp[spring-boot-sample-web-jsp]
  -- A web application using JSP templates
* link:spring-boot-sample-web-tomcat8-jsp[spring-boot-sample-tomcat8-jsp]
  -- A web application using JSP templates with Tomcat 8
* link:spring-boot-sample-web-tomcat-multi-connectors[spring-boot-sample-tomcat-multi-connectors]
  -- A web application using multiple connectors in tomcat, showing how to customize the Tomcat server
* link:spring-boot-sample-web-secure[spring-boot-sample-web-secure]
  -- A web application with typical Security configuration enabling a login form
* link:spring-boot-sample-web-method-security[spring-boot-sample-web-method-security]
  -- A web application with Security configuration enabling global method security
* link:spring-boot-sample-secure[spring-boot-sample-secure]
  -- example showing Spring Security in a non-web application
* link:spring-boot-sample-servlet[spring-boot-sample-servlet]
  -- example showing a "raw" `Servlet` returning plaintext content
* link:spring-boot-sample-ws[spring-boot-sample-ws]
  -- A simple contract-first SOAP web service with Spring Web Services
* link:spring-boot-sample-websocket[spring-boot-sample-websocket]
  -- A web application with Websocket support on the client and server
* link:spring-boot-sample-flyway[spring-boot-sample-flyway]
  -- Example showing database migrations with Flyway
* link:spring-boot-sample-liquibase[spring-boot-sample-liquibase]
  -- Example showing database migrations with Liquibase
* link:spring-boot-sample-amqp[spring-boot-sample-amqp]
  -- Example showing message-oriented application using RabbitMQ
* link:spring-boot-sample-hornetq[spring-boot-sample-hornetq]
  -- Example showing message-oriented application using HornetQ
* link:spring-boot-sample-batch[spring-boot-sample-batch]
  -- Define and run a Batch job in a few lines of code
* link:spring-boot-sample-data-jpa[spring-boot-sample-data-jpa]
  -- Spring Data JPA + Hibernate + HSQLDB
* link:spring-boot-sample-data-mongodb[spring-boot-sample-data-mongodb]
  -- Spring Data Mongo repositories
* link:spring-boot-sample-data-solr[spring-boot-sample-data-solr]
  -- Spring Data Solr repositories
* link:spring-boot-sample-data-redis[spring-boot-sample-data-redis]
  -- Simple usage of Spring Data Redis
* link:spring-boot-sample-data-rest[spring-boot-sample-data-rest]
  -- Crud repositories exposed as REST endpoints
* link:spring-boot-sample-integration[spring-boot-sample-integration]
  -- A spring integration application
* link:spring-boot-sample-profile[spring-boot-sample-profile]
  -- example showing Spring's `@profile` support
* link:spring-boot-sample-parent-context[spring-boot-sample-parent-context]
  -- example showing an `ApplicationContext` with a parent
* link:spring-boot-sample-aop[spring-boot-sample-aop]
  -- shows explicit usage of Spring AOP
* link:spring-boot-sample-traditional[spring-boot-sample-traditional]
  -- shows more traditional WAR packaging  (but also executable using `java -jar`)
* link:spring-boot-sample-xml[spring-boot-sample-xml]
  -- Example show how Spring Boot can be mixed with traditional XML configuration (we
  generally recommend using Java `@Configuration` whenever possible)