测试代码优化
This commit is contained in:
@@ -26,12 +26,6 @@ public class CodeStatistic {
|
|||||||
System.out.println("Path: " + path);
|
System.out.println("Path: " + path);
|
||||||
ArrayList<File> al = getFile(new File(path));
|
ArrayList<File> al = getFile(new File(path));
|
||||||
for (File f : al) {
|
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$")
|
if (f.getName().matches(".*\\.java$")
|
||||||
|| f.getName().matches(".*\\.html$")
|
|| f.getName().matches(".*\\.html$")
|
||||||
|| f.getName().matches(".*\\.js$")){
|
|| f.getName().matches(".*\\.js$")){
|
||||||
|
|||||||
@@ -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");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
16
common/src/test/java/logback.xml
Normal file
16
common/src/test/java/logback.xml
Normal 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>
|
||||||
@@ -2,5 +2,4 @@ eclipse.preferences.version=1
|
|||||||
encoding//src/main/java=UTF-8
|
encoding//src/main/java=UTF-8
|
||||||
encoding//src/main/resources=UTF-8
|
encoding//src/main/resources=UTF-8
|
||||||
encoding//src/test/java=UTF-8
|
encoding//src/test/java=UTF-8
|
||||||
encoding//src/test/resources=UTF-8
|
|
||||||
encoding/<project>=UTF-8
|
encoding/<project>=UTF-8
|
||||||
|
|||||||
@@ -485,6 +485,9 @@ file:
|
|||||||
# application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
# application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
||||||
# application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation
|
# application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||||
|
|
||||||
|
# 是否已文件流方式下载
|
||||||
|
isFileStreamDown: false
|
||||||
|
|
||||||
#======================================#
|
#======================================#
|
||||||
#========== Message settings ==========#
|
#========== Message settings ==========#
|
||||||
#======================================#
|
#======================================#
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class MobileAppTest {
|
|||||||
private static String loginUrl = "/login"
|
private static String loginUrl = "/login"
|
||||||
+ "?username=" + DesUtils.encode("system", "thinkgem,jeesite,com")
|
+ "?username=" + DesUtils.encode("system", "thinkgem,jeesite,com")
|
||||||
+ "&password=" + DesUtils.encode("admin", "thinkgem,jeesite,com")
|
+ "&password=" + DesUtils.encode("admin", "thinkgem,jeesite,com")
|
||||||
+ "¶m_deviceType=mobileApp&__sid=";
|
+ "¶m_deviceType=mobileApp¶m_lang=zh_CN&__sid=";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储的会话编号,则通过getSid()获取。
|
* 存储的会话编号,则通过getSid()获取。
|
||||||
|
|||||||
@@ -18,3 +18,6 @@ jdbc:
|
|||||||
password: 123456
|
password: 123456
|
||||||
testSql: SELECT 1
|
testSql: SELECT 1
|
||||||
|
|
||||||
|
# 日志配置
|
||||||
|
logging:
|
||||||
|
config: classpath:logback.xml
|
||||||
@@ -496,6 +496,9 @@ logging:
|
|||||||
## application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,
|
## application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,
|
||||||
## application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
## application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
||||||
## application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation
|
## application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||||
|
#
|
||||||
|
# # 是否已文件流方式下载
|
||||||
|
# isFileStreamDown: true
|
||||||
|
|
||||||
#======================================#
|
#======================================#
|
||||||
#========== Message settings ==========#
|
#========== Message settings ==========#
|
||||||
|
|||||||
19
web/src/test/java/logback.xml
Normal file
19
web/src/test/java/logback.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?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>
|
||||||
|
|
||||||
|
<!-- Framework level setting -->
|
||||||
|
<include resource="config/logger-core.xml"/>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
Reference in New Issue
Block a user