[操作疑難] Spring Rest Authentication

本帖最後由 twaiho2003 於 2016-1-18 15:55 編輯

如果要check username and password先可以update ,  應該加個Authentication係邊到?
request:
{
"admin":
   {
       "username":"aaa",
      "password":"bbbb"
  },

"greeting":
         {
              "id": 1,
             "text":"ccccc"
        }

}
@Entity
@Table(name = "greeting")
public class Greeting {

private String id;
private String text;
}

@RequestMapping(method = RequestMethod.PUT)
  public ResponseEntity<Greeting> update(@RequestBody Greeting greeting) {

}

spring interceptor

TOP

TOP

oauth openid connect

TOP

我已經改左做
public JsonNode update(@RequestBody JsonNode requestBody) {
}
退後一步就可以當javascript 咁用, 當然方便度冇得比

TOP