官术网_书友最值得收藏!

Step 2—Spring Security setup for a web application

We know that we have to instruct the application to start using Spring Security. One easy way is to declare the Spring Security filter in web.xml. If you want to avoid using XML and perform the actions using Java instead, then create a class that extends AbstractSecurityWebApplicationInitializer; this will do the trick of initializing the filter and setting Spring Security for your application:

public class SecurityWebApplicationInitializer
extends AbstractSecurityWebApplicationInitializer {

}

With this, we have completed all the setup required to see basic authentication in action.

主站蜘蛛池模板: 赣榆县| 鹿泉市| 巴彦淖尔市| 昌图县| 济南市| 博乐市| 新密市| 平武县| 万载县| 临海市| 台湾省| 溆浦县| 丰县| 奉贤区| 汉中市| 溆浦县| 米林县| 增城市| 缙云县| 金坛市| 汤阴县| 盘锦市| 新津县| 遵义市| 石景山区| 静安区| 麻城市| 许昌市| 华安县| 修武县| 龙口市| 莲花县| 浮梁县| 金堂县| 宁蒗| 堆龙德庆县| 澎湖县| 通州市| 孝感市| 犍为县| 太康县|