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

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.

主站蜘蛛池模板: 张掖市| 依兰县| 时尚| 韩城市| 应城市| 冀州市| 兴宁市| 龙胜| 九江市| 泰安市| 栖霞市| 高要市| 大理市| 福海县| 石河子市| 承德县| 双鸭山市| 苍梧县| 惠东县| 沐川县| 四子王旗| 乌审旗| 偏关县| 龙海市| 鹤壁市| 丰原市| 乌拉特中旗| 清河县| 浠水县| 历史| 当阳市| 集贤县| 张家川| 平南县| 元朗区| 醴陵市| 同心县| 林甸县| 虞城县| 自贡市| 苍梧县|