- Spring Boot 2.0 Cookbook(Second Edition)
- Alex Antonov
- 102字
- 2021-06-24 19:24:40
How to do it...
- It is a good idea to separate and group the configurations into different classes in order to provide more clarity about what kind of things are being configured. So, let's create a separate configuration class called WebConfiguration in the src/main/java/com/example/bookpub directory from the root of our project with the following content:
@Configuration public class WebConfiguration { @Bean public RemoteIpFilter remoteIpFilter() { return new RemoteIpFilter(); } }
- Start the application by running ./gradlew clean bootRun.
- In the startup log, we should see the following line, indicating that our filter has been added:
...FilterRegistrationBean : Mapping filter: 'remoteIpFilter' to: [/*]
推薦閱讀
- 同步:秩序如何從混沌中涌現(xiàn)
- 數(shù)據(jù)要素安全流通
- SQL入門(mén)經(jīng)典(第5版)
- Java Data Science Cookbook
- SQL Server入門(mén)經(jīng)典
- SQL查詢:從入門(mén)到實(shí)踐(第4版)
- 業(yè)務(wù)數(shù)據(jù)分析:五招破解業(yè)務(wù)難題
- 數(shù)據(jù)化網(wǎng)站運(yùn)營(yíng)深度剖析
- Dependency Injection with AngularJS
- INSTANT Cytoscape Complex Network Analysis How-to
- Hadoop 3.x大數(shù)據(jù)開(kāi)發(fā)實(shí)戰(zhàn)
- 網(wǎng)站數(shù)據(jù)庫(kù)技術(shù)
- Spark分布式處理實(shí)戰(zhàn)
- 數(shù)據(jù)分析師養(yǎng)成寶典
- 聯(lián)動(dòng)Oracle:設(shè)計(jì)思想、架構(gòu)實(shí)現(xiàn)與AWR報(bào)告