15 lines
518 B
Java
15 lines
518 B
Java
import java.net.URI;
|
|
import org.springframework.web.util.UriComponentsBuilder;
|
|
|
|
public class test_uri2 {
|
|
public static void main(String[] args) {
|
|
// Mock what Spring Security does
|
|
String base = "https://accounts.google.com/o/oauth2/v2/auth?prompt=select_account";
|
|
String full = UriComponentsBuilder.fromUriString(base)
|
|
.queryParam("client_id", "123")
|
|
.queryParam("response_type", "code")
|
|
.build().toUriString();
|
|
System.out.println(full);
|
|
}
|
|
}
|