提案审核提交增加转圈圈、如果域名解析失败,不缓存,等待两秒重新读取,共三次,域名解析成功缓存一分钟;手机端审核撤回失败,审核下拉选择参数自动弹出审核页等bug
This commit is contained in:
@@ -63,17 +63,29 @@ public class MainLauncher {
|
||||
private Dao dao;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
configureDnsCache();
|
||||
NbApp nb = new NbApp().setArgs(args).setPrintProcDoc(true);
|
||||
nb.getAppContext().setMainPackage("com.budwk");
|
||||
nb.run();
|
||||
}
|
||||
|
||||
public static NbApp warMain(ServletContext sc) {
|
||||
configureDnsCache();
|
||||
NbApp nb = new NbApp().setPrintProcDoc(true);
|
||||
nb.getAppContext().setMainPackage("com.budwk");
|
||||
return nb;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在启动框架及网络依赖之前设置 JVM 域名缓存:成功缓存 60 秒,失败不缓存。
|
||||
* 此策略作用于整个 JVM;共享 WAR 容器若已初始化解析器,需在容器启动配置中设置。
|
||||
* 无入参、无返回值;不清理操作系统或 DNS 服务器的缓存。
|
||||
*/
|
||||
private static void configureDnsCache() {
|
||||
java.security.Security.setProperty("networkaddress.cache.ttl", "60");
|
||||
java.security.Security.setProperty("networkaddress.cache.negative.ttl", "0");
|
||||
}
|
||||
|
||||
public void init() {
|
||||
Mvcs.DISABLE_X_POWERED_BY = true;
|
||||
Globals.AppBase = Mvcs.getServletContext().getContextPath();
|
||||
|
||||
Reference in New Issue
Block a user