This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BackUpTableTask extends TimerTask { | |
private static Log log = LogFactory.getLog(BackUpTableTask.class); | |
private static boolean isRunning = false; | |
public void run() { | |
if (!isRunning) { | |
isRunning = true; | |
log.debug("开始执行任务..."); //开始任务 | |
//working add what you want to do | |
log.debug("执行任务完成..."); //任务完成 | |
isRunning = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.util.Timer timer = new java.util.Timer(true); | |
// true 说明这个timer以daemon方式运行(优先级低, | |
// 程序结束timer也自动结束),注意,javax.swing | |
// 包中也有一个Timer类,如果import中用到swing包, | |
// 要注意名字的冲突。 | |
TimerTask task = new TimerTask() { | |
public void run() { | |
... //每次需要执行的代码放到这里面。 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | |
<script type="text/javascript" src="js/jquery.js"></script> | |
<title></title> | |
</head> | |
<body> | |
<form action="#"> | |
<input type="file" name="myfile" id="xx" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kaishengit.dao.core; | |
import java.io.Serializable; | |
import java.lang.reflect.ParameterizedType; | |
import java.lang.reflect.Type; | |
import java.util.List; | |
import java.util.Map; | |
import org.hibernate.Criteria; | |
import org.hibernate.Query; |