Creating configuration property beans

@EnableConfigurationProperties, applied anywhere in our application, will cause a bean of the named type, ChatConfigProperties, to get added to the application context. A configuration property bean is meant to hold various settings that can be configured with optional defaults and can be overridden through various means.

Remember properties like server.port where we adjusted the default port our Netty web container listened for web requests? All the properties we've seen through this book are all configuration property beans. This annotation simply gives us the means to define our own property settings specific to our application.

In this case, ChatConfigProperties is aimed at configuring the WebSocket ...

Get Learning Spring Boot 2.0 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.