【发布时间】:2013-06-04 12:18:27
【问题描述】:
我正在尝试通过关注this example 创建一个 IPN 侦听器:
public class IPNListenerServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
ConfigManager.getInstance().load(this.getClass().getResourceAsStream("/sdk_config.properties"));
IPNMessage ipnlistener = new IPNMessage(request);
boolean isIpnVerified = ipnlistener.validate();
String transactionType = ipnlistener.getTransactionType();
Map<String,String> map = ipnlistener.getIpnMap();
LoggingManager.info(IPNListenerServlet.class, "******* IPN (name:value) pair : "+ map + " " +
"######### TransactionType : "+transactionType+" ======== IPN verified : "+ isIpnVerified);
}
}
但是 ConfigManager.getInstance().load() 已被弃用,并且在我的项目中,配置文件不在默认位置,那么加载配置文件的正确方法是什么?
【问题讨论】:
-
我也有同样的问题。请帮忙!
-
@BrunoDeFreitasBarros:我写了一篇博文alfplus.com/2013/06/paypal-ipn-odyssey-part-2
标签: java paypal paypal-ipn