-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
为了结合另外一个xf项目。更改了包结构!!!更改了依赖名!!!我保证!!!这是最后一次变更如此大的改动!!!!!
- Loading branch information
yyx
committed
Feb 15, 2019
1 parent
0ebf9f4
commit d0fe0b7
Showing
47 changed files
with
197 additions
and
195 deletions.
There are no files selected for viewing
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
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
44 changes: 44 additions & 0 deletions
44
src/main/java/org/yyx/xf/commons/domain/exception/BaseException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.yyx.xf.commons.domain.exception; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* 异常基础类 | ||
* <p> | ||
* | ||
* @author 叶云轩 at [email protected] | ||
* @date 2019-02-16-00:14 | ||
*/ | ||
public class BaseException extends RuntimeException { | ||
|
||
/** | ||
* BaseException 日志输出 | ||
*/ | ||
private final static Logger LOGGER = LoggerFactory.getLogger(BaseException.class); | ||
private static final long serialVersionUID = -7034897190745767639L; | ||
|
||
public BaseException() { | ||
super(); | ||
} | ||
|
||
public BaseException(String message) { | ||
super(message); | ||
LOGGER.info("[BaseException] -> [message] {} ", message); | ||
} | ||
|
||
public BaseException(String message, Throwable cause) { | ||
super(message, cause); | ||
LOGGER.info("[BaseException] -> [message] {} ", message); | ||
} | ||
|
||
public BaseException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
protected BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { | ||
super(message, cause, enableSuppression, writableStackTrace); | ||
} | ||
|
||
|
||
} |
4 changes: 2 additions & 2 deletions
4
...ava/org/yyx/exception/ParamException.java → ...mons/domain/exception/ParamException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package org.yyx.exception; | ||
package org.yyx.xf.commons.domain.exception; | ||
|
||
/** | ||
* 参数类型的异常 | ||
* | ||
* @author 叶云轩 contact by [email protected] | ||
* @date 2018/1/24 17:53 | ||
*/ | ||
public class ParamException extends RuntimeException { | ||
public class ParamException extends BaseException { | ||
|
||
/** | ||
* 序列化标识 | ||
|
2 changes: 1 addition & 1 deletion
2
...yyx/constant/maven/MavenFileConstant.java → ...en/domain/constant/MavenFileConstant.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.yyx.constant.maven; | ||
package org.yyx.xf.tool.build.maven.domain.constant; | ||
|
||
/** | ||
* Maven文件常量 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
package org.yyx.util.maven; | ||
package org.yyx.xf.tool.build.maven.util; | ||
|
||
import com.google.common.util.concurrent.ThreadFactoryBuilder; | ||
import org.dom4j.Document; | ||
import org.dom4j.DocumentException; | ||
import org.dom4j.Element; | ||
import org.dom4j.io.SAXReader; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.yyx.util.file.io.UtilFile; | ||
import org.yyx.util.string.UtilString; | ||
import org.yyx.xf.tool.document.file.util.UtilFile; | ||
import org.yyx.xf.tool.string.util.UtilString; | ||
|
||
import java.io.File; | ||
import java.util.Iterator; | ||
import java.util.Map; | ||
import java.util.concurrent.ExecutorService; | ||
import java.util.concurrent.LinkedBlockingQueue; | ||
import java.util.concurrent.ThreadFactory; | ||
import java.util.concurrent.ThreadPoolExecutor; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
import static ch.qos.logback.core.rolling.helper.FileFilterUtil.isEmptyDirectory; | ||
import static org.yyx.constant.maven.MavenFileConstant.$; | ||
import static org.yyx.constant.maven.MavenFileConstant.LAST_UPDATED; | ||
import static org.yyx.constant.maven.MavenFileConstant.M2_HOME; | ||
import static org.yyx.constant.maven.MavenFileConstant.MAVEN_HOME; | ||
import static org.yyx.constant.maven.MavenFileConstant.UN_KNOWN; | ||
import static org.yyx.xf.tool.build.maven.domain.constant.MavenFileConstant.$; | ||
import static org.yyx.xf.tool.build.maven.domain.constant.MavenFileConstant.LAST_UPDATED; | ||
import static org.yyx.xf.tool.build.maven.domain.constant.MavenFileConstant.M2_HOME; | ||
import static org.yyx.xf.tool.build.maven.domain.constant.MavenFileConstant.MAVEN_HOME; | ||
import static org.yyx.xf.tool.build.maven.domain.constant.MavenFileConstant.UN_KNOWN; | ||
|
||
/** | ||
* 清理Maven目录下.lastUpdated Unkonw 等无用文件或目录 | ||
|
@@ -33,17 +27,13 @@ | |
* @author 叶云轩 at [email protected] | ||
* @date 2018-12-31-22:26 | ||
*/ | ||
public class UtilMavenClean { | ||
public class UtilMaven { | ||
/** | ||
* UtilMavenClean 日志输出 | ||
* UtilMaven 日志输出 | ||
*/ | ||
private static final Logger LOGGER = LoggerFactory.getLogger(UtilMavenClean.class); | ||
private static ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("demo-pool-%d").build(); | ||
private static ExecutorService singleThreadPool = new ThreadPoolExecutor(1, 1, | ||
0L, TimeUnit.MILLISECONDS, | ||
new LinkedBlockingQueue<>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); | ||
private static final Logger LOGGER = LoggerFactory.getLogger(UtilMaven.class); | ||
|
||
private UtilMavenClean() { | ||
private UtilMaven() { | ||
} | ||
|
||
|
||
|
@@ -130,16 +120,11 @@ public static void clean(final String mavenRepositoryPath) { | |
// 将路径以文件的形式表示 | ||
File mavenRepositoryFile = new File(mavenRepositoryPath); | ||
// 一个线程去找输入文件下目录路径 | ||
// singleThreadPool.execute(() -> { | ||
if (mavenRepositoryFile.exists()) { | ||
// 说明文件存在 | ||
doClean(mavenRepositoryFile); | ||
} | ||
// }); | ||
// 另一个线程去自动查找环境变量 | ||
// singleThreadPool.execute(() -> | ||
checkEnv(mavenRepositoryPath) | ||
// ) | ||
if (mavenRepositoryFile.exists()) { | ||
// 说明文件存在 | ||
doClean(mavenRepositoryFile); | ||
} | ||
checkEnv(mavenRepositoryPath) | ||
; | ||
} | ||
|
||
|
@@ -196,7 +181,8 @@ private static void doClean(String repositoryPath) { | |
* @return localRepositoryPath | ||
*/ | ||
protected static String getLocalRepository(String mavenHome) { | ||
String settingsFile = mavenHome + "/settings.xml"; | ||
// todo 判断 | ||
String settingsFile = mavenHome + "/conf/settings.xml"; | ||
File file = new File(settingsFile); | ||
SAXReader reader = new SAXReader(); | ||
Document document; | ||
|
4 changes: 2 additions & 2 deletions
4
...main/java/org/yyx/util/date/UtilDate.java → ...a/org/yyx/xf/tool/date/util/UtilDate.java
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
package org.yyx.domain.entity; | ||
package org.yyx.xf.tool.db.domain.entity; | ||
|
||
import lombok.Data; | ||
import org.beetl.sql.core.annotatoin.AssignID; | ||
import org.yyx.util.string.UtilString; | ||
import org.yyx.xf.tool.string.util.UtilString; | ||
|
||
import java.util.Date; | ||
|
||
|
@@ -12,7 +13,8 @@ | |
* @author 叶云轩 at [email protected] | ||
* @date 2018/12/28-15:10 | ||
*/ | ||
public abstract class AbsBaseEntity implements BaseEntity { | ||
@Data | ||
public abstract class AbstractBaseEntity implements BaseEntity { | ||
|
||
/** | ||
* 数据库表记录唯一主键标识 | ||
|
@@ -32,42 +34,6 @@ public abstract class AbsBaseEntity implements BaseEntity { | |
*/ | ||
private Date gmtModified; | ||
|
||
@Override | ||
public Date getGmtCreate() { | ||
return gmtCreate; | ||
} | ||
|
||
public void setGmtCreate(Date gmtCreate) { | ||
this.gmtCreate = gmtCreate; | ||
} | ||
|
||
@Override | ||
public Date getGmtModified() { | ||
return gmtModified; | ||
} | ||
|
||
@Override | ||
public String getPkField() { | ||
return pkField; | ||
} | ||
|
||
public void setPkField(String pkField) { | ||
this.pkField = pkField; | ||
} | ||
|
||
@Override | ||
public short getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(short status) { | ||
this.status = status; | ||
} | ||
|
||
public void setGmtModified(Date gmtModified) { | ||
this.gmtModified = gmtModified; | ||
} | ||
|
||
/** | ||
* 初始化对象的方法 | ||
*/ | ||
|
2 changes: 1 addition & 1 deletion
2
...ava/org/yyx/domain/entity/BaseEntity.java → .../xf/tool/db/domain/entity/BaseEntity.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.yyx.domain.entity; | ||
package org.yyx.xf.tool.db.domain.entity; | ||
|
||
import java.util.Date; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...n/java/org/yyx/constant/FileConstant.java → ...nt/file/domain/constant/FileConstant.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.yyx.constant; | ||
package org.yyx.xf.tool.document.file.domain.constant; | ||
|
||
/** | ||
* 文件相关的常量 | ||
|
6 changes: 4 additions & 2 deletions
6
...org/yyx/exception/file/FileException.java → .../file/domain/exception/FileException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
package org.yyx.exception.file; | ||
package org.yyx.xf.tool.document.file.domain.exception; | ||
|
||
import org.yyx.xf.commons.domain.exception.BaseException; | ||
|
||
/** | ||
* 文件异常 | ||
* | ||
* @author 叶云轩 contact by [email protected] | ||
* @date 2018/1/24 19:29 | ||
*/ | ||
public class FileException extends RuntimeException { | ||
public class FileException extends BaseException { | ||
|
||
/** | ||
* 序列化标识 | ||
|
2 changes: 1 addition & 1 deletion
2
...yyx/exception/file/FileTypeException.java → ...e/domain/exception/FileTypeException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.yyx.exception.file; | ||
package org.yyx.xf.tool.document.file.domain.exception; | ||
|
||
/** | ||
* 文件类型不正确异常 | ||
|
8 changes: 4 additions & 4 deletions
8
...n/java/org/yyx/util/file/io/UtilFile.java → .../xf/tool/document/file/util/UtilFile.java
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
10 changes: 5 additions & 5 deletions
10
...in/java/org/yyx/util/file/io/UtilPDF.java → ...x/xf/tool/document/file/util/UtilPDF.java
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
2 changes: 1 addition & 1 deletion
2
...yx/constant/MergedCellMethodConstant.java → ...in/constant/MergedCellMethodConstant.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.yyx.constant; | ||
package org.yyx.xf.tool.document.word.domain.constant; | ||
|
||
/** | ||
* 单元格合并方式 | ||
|
2 changes: 1 addition & 1 deletion
2
...in/java/org/yyx/constant/XmlConstant.java → ...ent/word/domain/constant/XmlConstant.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.yyx.constant; | ||
package org.yyx.xf.tool.document.word.domain.constant; | ||
|
||
/** | ||
* Xml文档常量 | ||
|
Oops, something went wrong.