What is httpBasic method in spring security?
问题 I override configure(HttpSecurity http) method in SampleSecurityConfig Class like this @Override protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/delete/**").hasRole("ADMIN") .anyRequest().authenticated() .and() .formLogin().and().httpBasic(); } If i don't use httpBasic method, it seems no problem occurred. what does httpBasic method exactly do? 回答1: Calling this method on HttpSecurity will enable Http Basic Authentication for your