Compare commits

...

6 Commits
1.1.3 ... 1.1.5

Author SHA1 Message Date
曾文豪
0e6bee4714 publish 1.1.5 2024-06-19 13:54:11 +08:00
曾文豪
ae67cc53ec Merge branch 'new_characterUtils' into 'master'
优化移除特殊字符方法

See merge request tiesheng/tiesheng!5
2024-06-19 05:53:24 +00:00
‘毛文春’
419cb06ff6 feat:新增字符串处理工具类 2024-06-19 13:53:01 +08:00
曾文豪
384ac928e3 publish 1.1.4 2024-06-19 13:46:50 +08:00
曾文豪
130cd45de2 Merge branch 'new_CharacterUtil' into 'master'
新增字符串处理工具类

See merge request tiesheng/tiesheng!4
2024-06-19 05:45:11 +00:00
‘毛文春’
6840faa9d8 feat:新增字符串处理工具类 2024-06-19 13:44:53 +08:00
12 changed files with 65 additions and 21 deletions

20
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
<packaging>pom</packaging>
<name>springboot-parent</name>
<description>杭州铁晟科技有限公司基础依赖</description>
@@ -57,55 +57,55 @@
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-database</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-login</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-web</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-util</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-platform</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-message</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-encrypt</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-annotation</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-poi</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>

View File

@@ -6,11 +6,11 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-ademo</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-database</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-encrypt</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-login</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-platform</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-poi</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-util</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</parent>
<artifactId>springboot-web</artifactId>

View File

@@ -0,0 +1,44 @@
package com.tiesheng.core.util;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import java.util.Map;
public class CharacterUtils {
/**
* 移除特殊字符
*
* @param o 类
*/
public static void removeSymbol(Object o) {
removeSymbol(o, "\n|\r|\t| ");
}
/**
* 移除特殊字符
*
* @param o 类
* @param searchStr 规则
*/
public static void removeSymbol(Object o, String searchStr) {
JSONObject object = JSONUtil.parseObj(o, false);
for (Map.Entry<String, Object> entry : object) {
if (ObjectUtil.isEmpty(entry.getValue()) || StrUtil.equals("null", String.valueOf(entry.getValue()))) {
entry.setValue("");
continue;
}
if (StrUtil.isNotEmpty(entry.getKey())) {
entry.setValue(StrUtil.trim(StrUtil.replace(entry.getValue().toString(), searchStr, "")));
}
}
BeanUtil.copyProperties(object, o);
}
}