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

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.

主站蜘蛛池模板: 深圳市| 新蔡县| 新乡县| 吉安县| 清徐县| 贵定县| 响水县| 浏阳市| 太湖县| 白玉县| 栾城县| 扶沟县| 大连市| 宽城| 长乐市| 遂平县| 婺源县| 钦州市| 合山市| 高平市| 三台县| 历史| 游戏| 景洪市| 金乡县| 来宾市| 田东县| 肇东市| 绥化市| 沐川县| 泽州县| 梁平县| 泰安市| 叶城县| 静宁县| 濮阳县| 寻甸| 庄浪县| 廊坊市| 桃江县| 囊谦县|