在Play 2.4.3网络应用中,我需要使用public class CustomerOrdersModelView
{
public string CustomerID { get; set; }
public int FY { get; set; }
public float? price { get; set; }
....
....
}
public async Task<IActionResult> ProductAnnualReport(string rpt)
{
var qry = from c in _context.Customers
join ord in _context.Orders
on c.CustomerID equals ord.CustomerID into co
from m in co.DefaultIfEmpty()
select new CustomerOrdersModelView
{
CustomerID = c.CustomerID,
FY = c.FY,
price = co?.price ?? 0,
....
....
};
....
....
}
通过HTTPS调用其他服务。我跟着this MSDN example,但出现错误:
play.api.libs.ws.ssl.CompositeCertificateException:没有信任经理 能够验证此证书链:#of exceptions = 1
WSClient
内的例外:
sun.security.validator.ValidatorException:PKIX路径构建失败: sun.security.provider.certpath.SunCertPathBuilderException:无法 找到所请求目标的有效证书路径
负责SSL的CompositeCertificateException
的一部分:
application.conf
这里有什么问题?
答案 0 :(得分:2)
我通过以下步骤解决了问题:
jssecacerts
文件。application.conf
。配置示例:
play.ws.ssl {
trustManager = {
stores = [
{path: "C:/A/B/jssecacerts"}
{path: ${java.home}/lib/security/cacerts}
]
}
}