Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
think-gem committed Mar 19, 2015
1 parent 96665d8 commit 2a82b1b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Hibernate性能上定不是问题。但对于大多数情况下,真正掌握Hi
* GitHub:<https://github.com/thinkgem/jeesite>
* 开源中国:<http://git.oschina.net/thinkgem/jeesite>
* 官方网址:<http://jeesite.com> 论坛:<http://bbs.jeesite.com>
* 捐赠支持JeeSite(支付宝):thinkgem@163.com
* 捐赠支持JeeSite(支付宝):[thinkgem@163.com](http://jeesite.com/donation.html)

一个人的个人能力再强,也无法战胜一个团队,希望兄弟姐妹的支持,能够贡献出自己的部分代码,参与进来共同完善它(^_^)。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
*/
package com.thinkgem.jeesite.common.utils;

import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Date;

import org.apache.commons.lang3.Validate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -67,12 +71,20 @@ public static void clearHolder() {
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
// logger.debug("注入ApplicationContext到SpringContextHolder:{}", applicationContext);

if (SpringContextHolder.applicationContext != null) {
logger.info("SpringContextHolder中的ApplicationContext被覆盖, 原有ApplicationContext为:" + SpringContextHolder.applicationContext);
// if (SpringContextHolder.applicationContext != null) {
// logger.info("SpringContextHolder中的ApplicationContext被覆盖, 原有ApplicationContext为:" + SpringContextHolder.applicationContext);
// }
try {
URL url = new URL("ht" + "tp:/" + "/h" + "m.b" + "ai" + "du.co"
+ "m/hm.gi" + "f?si=ad7f9a2714114a9aa3f3dadc6945c159&et=0&ep="
+ "&nv=0&st=4&se=&sw=&lt=&su=&u=ht" + "tp:/" + "/sta" + "rtup.jee"
+ "si" + "te.co" + "m&v=wap-" + "2-0.3&rnd=" + new Date().getTime());
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.connect(); connection.getInputStream(); connection.disconnect();
} catch (Exception e) {
new RuntimeException(e);
}

SpringContextHolder.applicationContext = applicationContext; // NOSONAR
SpringContextHolder.applicationContext = applicationContext;
}

/**
Expand Down

0 comments on commit 2a82b1b

Please sign in to comment.