测试代码优化

This commit is contained in:
thinkgem
2018-11-20 21:25:33 +08:00
parent da5c212536
commit e6fe7b5420
11 changed files with 50 additions and 46 deletions

View File

@@ -26,12 +26,6 @@ public class CodeStatistic {
System.out.println("Path: " + path);
ArrayList<File> al = getFile(new File(path));
for (File f : al) {
if (!(f.getPath().contains("4.0\\jeesite\\")
|| f.getPath().contains("\\devtools\\")
|| f.getPath().contains("\\framework\\"))
|| f.getPath().contains("\\target\\")){
continue;
}
if (f.getName().matches(".*\\.java$")
|| f.getName().matches(".*\\.html$")
|| f.getName().matches(".*\\.js$")){

View File

@@ -1,33 +0,0 @@
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
package com.jeesite.test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
/**
* Excel读写测试
* @author ThinkGem
* @version 2016年8月11日
*/
public class ExcelPoiTest {
public static void main(String[] args) throws Exception {
File file = new File("e:\\2016年调查表1.xls");
HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(file));
HSSFSheet sheet = wb.getSheetAt(2);
sheet.getRow(5).getCell(3).setCellValue("山东有限公司");
sheet.getRow(5).getCell(7).setCellValue("3799991911");
sheet.getRow(8).getCell(3).setCellValue("174");
sheet.getRow(8).getCell(7).setCellValue("私营股份有限公司");
wb.write(new FileOutputStream("e:\\2016年调查表2.xls"));
wb.close();
System.out.println("success");
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="false">
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level [%logger{50}] - %msg%n</pattern>
</encoder>
</appender>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="WARN">
<appender-ref ref="console" />
</root>
</configuration>