This file contains 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
<dependency> | |
<groupId>org.testng</groupId> | |
<artifactId>testng</artifactId> | |
<version>6.8.5</version> | |
</dependency> | |
<dependency> | |
<groupId>org.mockito</groupId> | |
<artifactId>mockito-all</artifactId> | |
<version>1.9.5</version> |
This file contains 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
import com.XXX.sysdev.virtualsys.BaseTest; | |
import com.XXX.sysdev.virtualsys.dao.IdcDao; | |
import com.XXX.sysdev.virtualsys.model.Idc; | |
import org.mockito.InjectMocks; | |
import org.mockito.Mock; | |
import org.testng.annotations.BeforeMethod; | |
import org.testng.annotations.Test; |
This file contains 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
import org.mockito.MockitoAnnotations; | |
import org.springframework.test.context.ContextConfiguration; | |
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; | |
import org.springframework.test.context.transaction.TransactionConfiguration; | |
import org.springframework.transaction.annotation.Transactional; | |
import org.testng.annotations.BeforeClass; | |
@ContextConfiguration({ |
This file contains 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
http://qt-project.org/wiki/Gerrit-Introduction |
This file contains 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
/* | |
* Hibernate, Relational Persistence for Idiomatic Java | |
* | |
* Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as | |
* indicated by the @author tags or express copyright attribution | |
* statements applied by the authors. All third-party contributions are | |
* distributed under license by Red Hat Middleware LLC. | |
* | |
* This copyrighted material is made available to anyone wishing to use, modify, | |
* copy, or redistribute it subject to the terms and conditions of the GNU |
This file contains 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
/* | |
* Hibernate, Relational Persistence for Idiomatic Java | |
* | |
* Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as | |
* indicated by the @author tags or express copyright attribution | |
* statements applied by the authors. All third-party contributions are | |
* distributed under license by Red Hat Middleware LLC. | |
* | |
* This copyrighted material is made available to anyone wishing to use, modify, | |
* copy, or redistribute it subject to the terms and conditions of the GNU |
This file contains 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
#!/bin/bash | |
#可以修改为工程所在的目录 | |
user=yourhome | |
apphome=virtualinterface | |
appdir=/root/${user}/${apphome} | |
appdir_back=/root/${user}/${apphome}_back |
This file contains 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
HttpClient client = new HttpClient(); | |
HttpMethodRetryHandler myretryhandler = new HttpMethodRetryHandler() { | |
public boolean retryMethod( | |
final HttpMethod method, | |
final IOException exception, | |
int executionCount) { | |
if (executionCount >= 5) { | |
// Do not retry if over max retry count | |
return false; |
This file contains 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
HSSFWorkbook wb = getExcelData(ippes); | |
response.setContentType("application/octet-stream"); | |
if(StringUtils.isNotEmpty(timeSession)){ | |
startTimeStr = new Date(new Date().getTime()-24*60*60*1000); | |
endTimeStr = new Date(); | |
} | |
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("IP端口流量-from-" + sdf.format(startTimeStr) + "-to-" + sdf.format(endTimeStr) + ".xls","UTF-8") ); | |
wb.write(response.getOutputStream()); | |
response.getOutputStream().flush(); | |
response.getOutputStream().close(); |
This file contains 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
/** | |
* Logback: the reliable, generic, fast and flexible logging framework. | |
* Copyright (C) 1999-2013, QOS.ch. All rights reserved. | |
* | |
* This program and the accompanying materials are dual-licensed under | |
* either the terms of the Eclipse Public License v1.0 as published by | |
* the Eclipse Foundation | |
* | |
* or (per the licensee's choosing) | |
* |