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

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.

主站蜘蛛池模板: 玉树县| 永平县| 德惠市| 安远县| 金华市| 襄垣县| 巴里| 仲巴县| 辽源市| 元谋县| 东兰县| 饶河县| 万源市| 滁州市| 黎平县| 都昌县| 津市市| 怀远县| 郴州市| 施甸县| 五原县| 汤原县| 双鸭山市| 屏南县| 牟定县| 阳东县| 南汇区| 永城市| 洛南县| 临夏市| 延安市| 宣武区| 温州市| 即墨市| 桐梓县| 郁南县| 兴国县| 东辽县| 晋江市| 潜江市| 大田县|