springSecurity無法進行post請求

只能進行**get**請求無法進行**post**請求因爲默認開啓**csrf**跨域攔截,關閉跨域攔截就ok了
  @Override
    protected void configure(HttpSecurity httpSecurity) throws Exception {
        httpSecurity
                //關閉防跨域
                .csrf()
                .disable();
    }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章