- Spring Boot 2.0 Cookbook(Second Edition)
- Alex Antonov
- 163字
- 2021-06-24 19:24:41
How it works...
When it comes to configuring the Spring MVC internals, it is not as simple as just defining a bunch of beans at least not always. This is due to the need to provide a more fine-tuned mapping of the MVC components to requests. To make things easier, Spring provides us with a collection of default methods in WebMvcConfigurer interface that we can extend and override the settings of that we need.
In the particular case of configuring interceptors, we are overriding the addInterceptors(InterceptorRegistry registry) method. This is a typical callback method where we are given a registry in order to register as many additional interceptors as we need. During the MVC autoconfiguration phase, Spring Boot, just like in the case of filters, detects instances of WebMvcConfigurer and sequentially calls the callback methods on all of them. It means that we can have more than one implementation of the WebMvcConfigurer class if we want to have some logical separation.
- PyTorch深度學習實戰:從新手小白到數據科學家
- InfluxDB原理與實戰
- 大數據可視化
- 卷積神經網絡的Python實現
- Python廣告數據挖掘與分析實戰
- 大話Oracle Grid:云時代的RAC
- 跟老男孩學Linux運維:MySQL入門與提高實踐
- 活用數據:驅動業務的數據分析實戰
- Oracle 11g+ASP.NET數據庫系統開發案例教程
- Hands-On System Programming with C++
- Oracle 11g數據庫管理員指南
- 一類智能優化算法的改進及應用研究
- 全球智庫評價報告(2015)
- Hadoop海量數據處理:技術詳解與項目實戰(第2版)
- Getting Started with Review Board