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