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

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.

主站蜘蛛池模板: 汽车| 桃园市| 子洲县| 平湖市| 阿拉善盟| 新邵县| 河源市| 苍南县| 青龙| 天津市| 宜君县| 隆安县| 西盟| 金山区| 兴宁市| 松潘县| 林州市| 罗平县| 凤凰县| 绿春县| 曲沃县| 宜丰县| 勃利县| 宁远县| 呈贡县| 东乡县| 罗江县| 自治县| 罗江县| 南昌市| 平南县| 韶山市| 黄梅县| 长葛市| 龙海市| 临海市| 集安市| 襄垣县| 江城| 章丘市| 启东市|