Spring Boot Reference Guide
1.4.0.BUILD-SNAPSHOT Spring Boot iv
Loading YAML .................................................................................................. 62
Exposing YAML as properties in the Spring Environment .................................... 62
Multi-profile YAML documents ........................................................................... 62
YAML shortcomings .......................................................................................... 63
24.7. Type-safe Configuration Properties .................................................................... 63
Third-party configuration .................................................................................... 65
Relaxed binding ................................................................................................ 65
Properties conversion ........................................................................................ 66
@ConfigurationProperties Validation .................................................................. 66
25. Profiles ....................................................................................................................... 68
25.1. Adding active profiles ....................................................................................... 68
25.2. Programmatically setting profiles ....................................................................... 68
25.3. Profile-specific configuration files ....................................................................... 69
26. Logging ....................................................................................................................... 70
26.1. Log format ....................................................................................................... 70
26.2. Console output ................................................................................................. 70
Color-coded output ............................................................................................ 71
26.3. File output ........................................................................................................ 72
26.4. Log Levels ....................................................................................................... 72
26.5. Custom log configuration .................................................................................. 73
26.6. Logback extensions .......................................................................................... 74
Profile-specific configuration .............................................................................. 75
Environment properties ...................................................................................... 75
27. Developing web applications ........................................................................................ 76
27.1. The ‘Spring Web MVC framework’ .................................................................... 76
Spring MVC auto-configuration .......................................................................... 76
HttpMessageConverters .................................................................................... 77
Custom JSON Serializers and Deserializers ....................................................... 77
MessageCodesResolver .................................................................................... 78
Static Content ................................................................................................... 78
ConfigurableWebBindingInitializer ...................................................................... 79
Template engines .............................................................................................. 79
Error Handling .................................................................................................. 80
Custom error pages .................................................................................. 81
Mapping error pages outside of Spring MVC .............................................. 81
Error Handling on WebSphere Application Server ....................................... 82
Spring HATEOAS .............................................................................................. 82
CORS support .................................................................................................. 82
27.2. JAX-RS and Jersey .......................................................................................... 83
27.3. Embedded servlet container support .................................................................. 84
Servlets, Filters, and listeners ............................................................................ 84
Registering Servlets, Filters, and listeners as Spring beans ......................... 84
Servlet Context Initialization ............................................................................... 84
Scanning for Servlets, Filters, and listeners ................................................ 85
The EmbeddedWebApplicationContext ............................................................... 85
Customizing embedded servlet containers .......................................................... 85
Programmatic customization ...................................................................... 86
Customizing ConfigurableEmbeddedServletContainer directly ...................... 86
JSP limitations .................................................................................................. 86
28. Security ...................................................................................................................... 87