spring security 跨域防护退出
开启csrf防护功能后,/logout需要以post的方式提交
************************
示例
****************
service 层
CustomUserDetailsService
@Service
public class CustomUserDetailsService implements UserDetailsService {
@Resource
private PasswordEncoder passwordEncoder;
@Override
public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
String username="gtlx";