我如何在grails中使用以下代码 -
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException {
return;
}
public void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException {
return;
}
}
};
Run Code Online (Sandbox Code Playgroud)
当我在JAVA项目中运行相同的代码时,上面的代码工作正常,但Grails没有编译代码并给出错误 - 第一行上的数组构造函数调用没有表达式.
groovy ×1