Example usage for org.springframework.web HttpRequestMethodNotSupportedException printStackTrace

List of usage examples for org.springframework.web HttpRequestMethodNotSupportedException printStackTrace

Introduction

In this page you can find the example usage for org.springframework.web HttpRequestMethodNotSupportedException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.clz.share.sec.util.SignInUtils.java

public static ResponseEntity<?> signinOauth2A(String userId) {

    Principal principal = signinPrivate(userId);
    System.out.println("         pricipal  " + principal.getName());

    ResponseEntity<?> res = null;//from  ww w  . j  a v  a2 s  . co m
    try {
        return getToken(principal);
    } catch (HttpRequestMethodNotSupportedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return res;
}

From source file:com.clz.share.sec.util.SignInUtils.java

public static ResponseEntity<?> signinOauth2(String userId) {

    HashMap<String, String> parameters = new HashMap<String, String>();
    parameters.put("client_id", "appid");
    parameters.put("client_secret", "myOAuthSecret");
    parameters.put("grant_type", "password");
    parameters.put("username", "user");
    parameters.put("password", "pass");
    parameters.put("scope", "read write");

    Principal principal = signinPrivate(userId);
    System.out.println("         pricipal  " + principal.getName());

    ResponseEntity<?> res = null;//from ww  w.  java2 s.co m
    try {
        return getToken(principal);
    } catch (HttpRequestMethodNotSupportedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return res;
}