Compare commits

..

10 Commits

Author SHA1 Message Date
曾文豪
0cb1581176 publish 1.0.1 2023-05-10 15:53:50 +08:00
曾文豪
5ed663e112 perf:fastjson禁用 将相同的对象写成引用的形式 2023-05-10 15:53:22 +08:00
曾文豪
b5fd837ccf perf:调整yml 2023-05-08 14:00:26 +08:00
曾文豪
38d6bae04f publish 1.0.0 2023-04-26 14:43:43 +08:00
曾文豪
e49bf32117 perf:增加参数配置时的额外校验 2023-04-23 16:35:48 +08:00
曾文豪
bc3ea0e10c perf:依赖更新 2023-04-23 16:32:29 +08:00
曾文豪
305dc743b2 chore:更新gitlab-ci 2023-04-21 15:43:07 +08:00
曾文豪
6f0360bad5 chore:更新gitlab-ci 2023-04-21 15:37:43 +08:00
曾文豪
5012c4bd53 chore:更新gitlab-ci 2023-04-21 15:29:07 +08:00
曾文豪
dd69b3bb1f perf:依赖更新 2023-04-21 15:28:21 +08:00
17 changed files with 71 additions and 31 deletions

View File

@@ -9,8 +9,8 @@ deploy-jar:
rules:
- if: $CI_COMMIT_TAG
script:
- mvn clean deploy -Dmaven.test.skip -DaltDeploymentRepository=master::default::file:/usr/local/nginx/html/kepai-repo
- cd /usr/local/nginx/html/kepai-repo
- mvn clean deploy -Dmaven.test.skip -DaltDeploymentRepository=master::default::file:$TAG_REPO_FOLDER
- cd $TAG_REPO_FOLDER
- git checkout master
- git pull
- git add .

24
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.9.14</version>
<version>1.0.1</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>0.9.14</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-login</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-web</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-util</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-platform</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-message</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-encrypt</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-annotation</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-poi</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</dependency>
<dependency>
@@ -117,7 +117,7 @@
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.1</version>
<version>3.5.3</version>
</dependency>
</dependencies>
@@ -126,7 +126,7 @@
<pluginRepositories>
<pluginRepository>
<id>kepai-repo-plugin</id>
<url>http://git.kepai365.com/zeng_wenhao/kepai-repo/raw/master</url>
<url>http://git.kepai365.com/tiesheng/repository/raw/master</url>
</pluginRepository>
</pluginRepositories>

View File

@@ -6,11 +6,11 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</parent>
<artifactId>springboot-ademo</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
@@ -36,7 +36,7 @@
<repositories>
<repository>
<id>kepai-repo</id>
<url>http://git.kepai365.com/zeng_wenhao/kepai-repo/raw/master</url>
<url>http://git.kepai365.com/tiesheng/repository/raw/master</url>
</repository>
</repositories>

View File

@@ -2,15 +2,17 @@ package com.tiesheng.demo.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.TimeInterval;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.json.JSONUtil;
import cn.hutool.log.LogFactory;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.sax.handler.RowHandler;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.tiesheng.annotation.token.TokenIgnore;
import com.tiesheng.core.service.CoreLogService;
import com.tiesheng.core.service.CoreMessageService;
import com.tiesheng.core.util.ProcessImportConsumer;
import com.tiesheng.demo.pojos.PoiBean;
import com.tiesheng.demo.pojos.TestFile;
import com.tiesheng.login.config.token.TsTokenConfig;
@@ -27,6 +29,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
@@ -46,6 +49,8 @@ public class TestController {
EncryptConfig encryptConfig;
@Autowired
CoreMessageService coreMessageService;
@Autowired
CoreLogService coreLogService;
@RequestMapping("/index")
@@ -60,6 +65,25 @@ public class TestController {
@RequestMapping("/redirect")
@TokenIgnore
public void redirect(HttpServletResponse response) {
ArrayList<String> strings = CollUtil.newArrayList("11111","22222");
coreLogService.addProcess("fdfd", strings, new ProcessImportConsumer<String>() {
@Override
public int accept(List<String> list) {
LogFactory.get().info("list: " + list.size());
return 0;
}
@Override
public String getFailFile() {
LogFactory.get().info("getFailFile: " + strings.size());
return null;
}
});
LogFactory.get().info("strings: " + strings.size());
// tsTokenConfig.validToken("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NzYwMDY4NzUsImlkIjoiMSIsImVudmlyb25tZW50VHlwZSI6Im1vYmlsZSIsInNlcnZpY2UiOiJjb250ZXN0LXJlc2VydmUiLCJleHRyYSI6IiJ9.nsfxEFpCNHC7eNCS5DJXdu1VDdnHrTjSfgrozND70Lc", true);
globalConfig.redirect("mobile", "/test", response);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>0.9.14</version>
<version>1.0.1</version>
</parent>
<artifactId>springboot-util</artifactId>
@@ -33,14 +33,14 @@
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.11</version>
<version>5.8.16</version>
</dependency>
<!-- fastJson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.78</version>
<version>1.2.83</version>
</dependency>
<!-- 加解密 -->

View File

@@ -20,7 +20,9 @@ public class CommonUtil {
FastJsonConfig config = new FastJsonConfig();
config.setSerializerFeatures(SerializerFeature.WriteMapNullValue,
SerializerFeature.WriteNullStringAsEmpty,
SerializerFeature.WriteEnumUsingName);
SerializerFeature.WriteEnumUsingName,
SerializerFeature.DisableCircularReferenceDetect
);
config.setDateFormat("yyyy-MM-dd HH:mm:ss");
config.setSerializeFilters(new DesensitizeValueFilter());
return config;

View File

@@ -16,7 +16,7 @@ import javax.annotation.PostConstruct;
@ConfigurationProperties(prefix = "tiesheng.ip2region")
public class Ip2regionConfig {
private String dbUrl = "http://git.kepai365.com/zeng_wenhao/kepai-repo/raw/master/ipdb/ip2region.xdb";
private String dbUrl = "http://git.kepai365.com/tiesheng/repository/raw/master/ipdb/ip2region.xdb";
private String dbPath = System.getProperty("user.dir") + "/runtime/ip2region/ip2region.xdb";
///////////////////////////////////////////////////////////////////////////

View File

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

View File

@@ -14,6 +14,7 @@ import com.tiesheng.core.pojos.dto.config.ConfigFuncDTO;
import com.tiesheng.core.pojos.dto.config.ConfigSystemDTO;
import com.tiesheng.core.pojos.dto.config.EnumTypeDTO;
import com.tiesheng.core.service.CoreConfigService;
import com.tiesheng.core.service.TieshengWebConfigurer;
import com.tiesheng.util.exception.ApiException;
import com.tiesheng.util.pojos.ApiResp;
import org.springframework.beans.factory.annotation.Autowired;
@@ -31,6 +32,8 @@ public class ConfigController {
@Autowired
CoreConfigService coreConfigService;
@Autowired
TieshengWebConfigurer tieshengWebConfigurer;
/**
@@ -72,6 +75,8 @@ public class ConfigController {
configKey.setConfigVal(dto.getConfigVal());
configKey.setRemark(dto.getRemark());
configKey.setExtra(dto.getExtra());
tieshengWebConfigurer.configSystemCheck(configKey);
coreConfigService.updateById(configKey);
return ApiResp.respOK("");

View File

@@ -2,6 +2,7 @@ package com.tiesheng.core.service;
import cn.hutool.log.LogFactory;
import com.tiesheng.core.pojos.RequestUserInfo;
import com.tiesheng.core.pojos.dao.CoreConfigSystem;
import com.tiesheng.core.pojos.dao.CorePlatformUnique;
import com.tiesheng.login.config.token.bean.TokenBean;
import com.tiesheng.util.exception.ApiRespEnum;
@@ -54,6 +55,14 @@ public interface TieshengWebConfigurer {
return uploadPath;
}
/**
* 系统配置验证
* 如果不符合规则,可以抛出异常
*/
default void configSystemCheck(CoreConfigSystem configSystem) {
}
/**
* 登录逻辑
*