Skip to content

Commit 1f72192

Browse files
committed
gRPC import and export function, LDAP IdP added support for ldaps, API list exported to excel, AC/GTW OAuth 2.0 IdP secret added mask characters
1 parent ce41b82 commit 1f72192

File tree

157 files changed

+15375
-10540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+15375
-10540
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ licenseReport {
3535

3636
allprojects {
3737
group = 'tpi.dgrv4'
38-
version = 'release-rc-v4.5.13.1-7-g4901c09b3'
38+
version = 'release-rc-v4.5.15.7'
3939
apply plugin: 'io.spring.dependency-management'
4040

4141
repositories {
@@ -62,8 +62,8 @@ subprojects {
6262

6363

6464
dependencies {
65-
implementation files("${rootDir}/libsext/dgrv4_CodecUtil-v4.5.13.1-7-g4901c09b3-lib.jar")
66-
implementation files("${rootDir}/libsext/dgrv4_HttpUtil-v4.5.13.1-7-g4901c09b3-lib.jar")
65+
implementation files("${rootDir}/libsext/dgrv4_CodecUtil-v4.5.15.7-lib.jar")
66+
implementation files("${rootDir}/libsext/dgrv4_HttpUtil-v4.5.15.7-lib.jar")
6767

6868
implementation ('org.springframework.boot:spring-boot-starter-data-jpa'){
6969
exclude group: 'ch.qos.logback', module: 'logback-classic'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=..
2+
eclipse.preferences.version=1
Lines changed: 51 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,52 @@
1-
package tpi.dgrv4.common.constant;
2-
3-
public enum DateTimeFormatEnum {
4-
西元年月日T時分秒毫秒時區("yyyy-MM-dd'T'HH:mm:ss.SSSZ"),
5-
西元年月日T時分秒時區("yyyy-MM-dd'T'HH:mm:ssZ"),
6-
日月西元年時分秒毫秒("dd-MMM-yyyy HH:mm:ss:SSS"),
7-
西元年月日時分秒毫秒("yyyy-MM-dd HH:mm:ss.SSS"),
8-
西元年月日時分秒("yyyy-MM-dd HH:mm:ss"),
9-
西元年月日時分("yyyy-MM-dd HH:mm"),
10-
西元年月日時("yyyy-MM-dd HH"),
11-
西元年月日("yyyy-MM-dd"),
12-
西元年月("yyyy-MM"),
13-
西元年("yyyy"),
14-
15-
西元年月日時分秒毫秒_2("yyyy/MM/dd HH:mm:ss.SSS"),
16-
西元年月日時分秒_2("yyyy/MM/dd HH:mm:ss"),
17-
西元年月日時分_2("yyyy/MM/dd HH:mm"),
18-
西元年月日時_2("yyyy/MM/dd HH"),
19-
西元年月日_2("yyyy/MM/dd"),
20-
西元年月_2("yyyy/MM"),
21-
22-
西元年月日時分秒毫秒_3("yyyyMMdd HH:mm:ss.SSS"),
23-
西元年月日時分秒_3("yyyyMMdd HH:mm:ss"),
24-
西元年月日時分_3("yyyyMMdd HH:mm"),
25-
西元年月日時_3("yyyyMMdd HH"),
26-
西元年月日_3("yyyyMMdd"),
27-
28-
西元年月日時分秒毫秒_4("yyyyMMddHHmmssSSS"),
29-
西元年月日時分秒_4("yyyyMMddHHmmss"),
30-
西元年月日時分_4("yyyyMMddHHmm"),
31-
西元年月日時_4("yyyyMMddHH"),
32-
西元年月日_4("yyyyMMdd"),
33-
34-
35-
檔名後綴("yyyyMMddHHmmssSSS"),
36-
西元年月日時分秒_5("yyMMddHHmmss"),
37-
時分秒("HH:mm:ss"),
38-
時分("HH:mm")
39-
;
40-
41-
private String value;
42-
43-
private DateTimeFormatEnum(String value) {
44-
this.value = value;
45-
}
46-
47-
public String value() {
48-
return this.value;
49-
}
50-
1+
package tpi.dgrv4.common.constant;
2+
3+
public enum DateTimeFormatEnum {
4+
西元年月日T時分秒毫秒時區("yyyy-MM-dd'T'HH:mm:ss.SSSZ"),
5+
西元年月日T時分秒時區("yyyy-MM-dd'T'HH:mm:ssZ"),
6+
日月西元年時分秒毫秒("dd-MMM-yyyy HH:mm:ss:SSS"),
7+
西元年月日時分秒毫秒("yyyy-MM-dd HH:mm:ss.SSS"),
8+
西元年月日時分秒("yyyy-MM-dd HH:mm:ss"),
9+
西元年月日時分("yyyy-MM-dd HH:mm"),
10+
西元年月日時("yyyy-MM-dd HH"),
11+
西元年月日("yyyy-MM-dd"),
12+
西元年月("yyyy-MM"),
13+
西元年("yyyy"),
14+
15+
西元年月日時分秒毫秒_2("yyyy/MM/dd HH:mm:ss.SSS"),
16+
西元年月日時分秒_2("yyyy/MM/dd HH:mm:ss"),
17+
西元年月日時分_2("yyyy/MM/dd HH:mm"),
18+
西元年月日時_2("yyyy/MM/dd HH"),
19+
西元年月日_2("yyyy/MM/dd"),
20+
西元年月_2("yyyy/MM"),
21+
22+
西元年月日時分秒毫秒_3("yyyyMMdd HH:mm:ss.SSS"),
23+
西元年月日時分秒_3("yyyyMMdd HH:mm:ss"),
24+
西元年月日時分_3("yyyyMMdd HH:mm"),
25+
西元年月日時_3("yyyyMMdd HH"),
26+
西元年月日_3("yyyyMMdd"),
27+
28+
西元年月日時分秒毫秒_4("yyyyMMddHHmmssSSS"),
29+
西元年月日時分秒_4("yyyyMMddHHmmss"),
30+
西元年月日時分_4("yyyyMMddHHmm"),
31+
西元年月日時_4("yyyyMMddHH"),
32+
西元年月日_4("yyyyMMdd"),
33+
34+
35+
檔名後綴("yyyyMMddHHmmssSSS"),
36+
西元年月日時分秒_5("yyMMddHHmmss"),
37+
時分秒("HH:mm:ss"),
38+
時分("HH:mm"),
39+
匯出檔案格式("yyyyMMdd_HHmm")
40+
;
41+
42+
private String value;
43+
44+
private DateTimeFormatEnum(String value) {
45+
this.value = value;
46+
}
47+
48+
public String value() {
49+
return this.value;
50+
}
51+
5152
}

dgrv4_Common_lib/src/main/java/tpi/dgrv4/common/utils/autoInitSQL/Initializer/TsmpFuncTableInitializer.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class TsmpFuncTableInitializer {
2626
//用戶端管理
2727
"AC02","AC0202","AC0212","AC0222","AC1107","AC1116","AC0226","AC0227","AC0228","AC0229","AC0230","AC0231",
2828
//API管理
29-
"AC03","AC0301","AC0311","AC0315","AC0316","AC0318","AC0319","AC0320",
29+
"AC03","AC0301","AC0311","AC0315","AC0316","AC0318","AC0319","AC0320","AC0322",
3030
//監控管理(AC0706為無建立功能的告警頁面)
3131
"AC05","AC0501","AC0502","AC0503","AC0508","AC0509","AC0510","AC0702","AC0706",
3232
//報表管理(Kibana)
@@ -53,7 +53,7 @@ public class TsmpFuncTableInitializer {
5353
//用戶端管理
5454
"AC02","AC0202","AC0212","AC0222","AC1107","AC1116","AC0226","AC0227","AC0228","AC0229","AC0230","AC0231",
5555
//API管理
56-
"AC03","AC0301","AC0311","AC0315","AC0316","AC0318","AC0319","AC0320",
56+
"AC03","AC0301","AC0311","AC0315","AC0316","AC0318","AC0319","AC0320","AC0322",
5757
//監控管理
5858
"AC05","AC0501","AC0502","AC0503","AC0508","AC0509","AC0510","AC0702",
5959
//報表管理(Kibana)
@@ -75,7 +75,7 @@ public class TsmpFuncTableInitializer {
7575
//用戶端管理
7676
"AC02","AC0202","AC0212","AC0222","AC1107","AC1116","AC0226","AC0227","AC0228","AC0229","AC0230","AC0231",
7777
//API管理
78-
"AC03","AC0301","AC0311","AC0315","AC0316","AC0318","AC0319","AC0320",
78+
"AC03","AC0301","AC0311","AC0315","AC0316","AC0318","AC0319","AC0320","AC0322",
7979
//監控管理(AC0706為無建立功能的告警頁面)
8080
"AC05","AC0501","AC0503","AC0509","AC0706",
8181
//報表管理(JS)
@@ -98,7 +98,7 @@ public class TsmpFuncTableInitializer {
9898
//用戶端管理
9999
"AC02","AC0202","AC0212","AC0222","AC1107","AC1116","AC0226","AC0227","AC0228","AC0229","AC0230","AC0231",
100100
//API管理
101-
"AC03","AC0301","AC0311","AC0316","AC0318","AC0319","AC0320",
101+
"AC03","AC0301","AC0311","AC0316","AC0318","AC0319","AC0320","AC0322",
102102
//監控管理
103103
"AC05","AC0501","AC0503","AC0509","AC0706",
104104
//報表管理(JS)
@@ -335,6 +335,8 @@ public List<TsmpFuncVo> insertTsmpFunc(LicenseEditionTypeVo licenseEdition, bool
335335
createTsmpFunc("LB0012","Webhook Logs","Webhook Logs","Real time event notification logs","","en-US","manager",DateTimeUtil.now());
336336
createTsmpFunc("LB0012","Webhook Logs","Webhook Logs","即時事件通知推送紀錄","","zh-TW","manager",DateTimeUtil.now());
337337

338+
createTsmpFunc("AC0322","API List Export","API List Export","apiListExport","","en-US","manager",DateTimeUtil.now());
339+
createTsmpFunc("AC0322","API列表匯出","API List Export","apiListExport","","zh-TW","manager",DateTimeUtil.now());
338340
//取得版本tsmpFunc清單
339341
setVersionTsmpFunc(licenseEdition);
340342
List<TsmpFuncVo> tsmpFuncVos = new LinkedList<TsmpFuncVo>();
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package tpi.dgrv4.entity.repository;
22

33
import java.util.List;
4+
import java.util.Optional;
45

56
import org.springframework.data.jpa.repository.JpaRepository;
67
import org.springframework.stereotype.Repository;
@@ -10,10 +11,15 @@
1011

1112
@Repository
1213
public interface DgrWebhookApiMapDao extends JpaRepository<DgrWebhookApiMap, Long>, DgrWebhookApiMapSuperDao {
13-
14-
List<DgrWebhookApiMap> findByApiKeyAndModuleName(String apiKey, String moduleName);
15-
16-
List<DgrWebhookApiMap> findByWebhookNotifyId(Long webhookNotifyId);
17-
18-
List<DgrWebhookApiMap> findByCreateUser(String createUser);
14+
15+
List<DgrWebhookApiMap> findByApiKeyAndModuleName(String apiKey, String moduleName);
16+
17+
List<DgrWebhookApiMap> findByWebhookNotifyId(Long webhookNotifyId);
18+
19+
List<DgrWebhookApiMap> findByCreateUser(String createUser);
20+
21+
// DgrWebhookApiMap findByApiKeyAndModuleNameAndWebhookNotifyId(String apiKey, String moduleName,Long webhookNotifyId)
22+
void deleteByWebhookNotifyId(Long notifyIds);
23+
24+
1925
}

dgrv4_Entity_lib/src/main/java/tpi/dgrv4/entity/repository/DgrWebhookNotifyFieldDao.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ public interface DgrWebhookNotifyFieldDao extends JpaRepository<DgrWebhookNotify
1414
List<DgrWebhookNotifyField> findByWebhookNotifyId(Long webhookNotifyId);
1515

1616
List<DgrWebhookNotifyField> findByCreateUser(String createUser);
17+
18+
void deleteByWebhookNotifyIdIn(List<Long> notifyIds);
1719
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=..
2+
eclipse.preferences.version=1

dgrv4_Gateway_serv/sql/dgRv4-oracle-ddl-i18n.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2919,7 +2919,7 @@ CREATE INDEX idx_dgr_dashboard_es_log ON dgr_dashboard_es_log(rtime);
29192919
CREATE INDEX idx_tsmp_req_res_log_history ON tsmp_req_res_log_history(rtime);
29202920

29212921
-- 20250213, 增加欄位長度, Zoe Lee
2922-
ALTER TABLE dgr_rdb_connection MODIFY mima VARCHAR2(2000) NOT NULL;
2922+
ALTER TABLE dgr_rdb_connection MODIFY mima VARCHAR2(2000);
29232923

29242924
-- 20250227, DGR_WEBHOOK_NOTIFY , Webber Luo
29252925
CREATE TABLE dgr_webhook_notify
Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
package tpi.dgrv4;
2-
3-
import org.springframework.boot.SpringApplication;
4-
import org.springframework.boot.autoconfigure.SpringBootApplication;
5-
import org.springframework.boot.builder.SpringApplicationBuilder;
6-
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
7-
import tpi.dgrv4.common.utils.StackTraceUtil;
8-
import tpi.dgrv4.gateway.keeper.TPILogger;
9-
10-
@SpringBootApplication()
11-
public class DgrApplication extends SpringBootServletInitializer {
12-
13-
@Override
14-
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
15-
return application.sources(DgrApplication.class);
16-
}
17-
18-
19-
public static void main(String[] args) {
20-
try {
21-
SpringApplication.run(DgrApplication.class, args);
22-
}catch(Exception e) {
23-
TPILogger.tl.error(StackTraceUtil.logStackTrace(e));
24-
throw e;
25-
}
26-
}
27-
28-
}
1+
package tpi.dgrv4;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.boot.builder.SpringApplicationBuilder;
6+
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
7+
import tpi.dgrv4.common.utils.StackTraceUtil;
8+
import tpi.dgrv4.gateway.keeper.TPILogger;
9+
10+
@SpringBootApplication()
11+
public class DgrApplication extends SpringBootServletInitializer {
12+
13+
@Override
14+
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
15+
return application.sources(DgrApplication.class);
16+
}
17+
18+
19+
public static void main(String[] args) {
20+
try {
21+
SpringApplication.run(DgrApplication.class, args);
22+
}catch(Exception e) {
23+
TPILogger.tl.error(StackTraceUtil.logStackTrace(e));
24+
System.exit(1);
25+
// throw e;
26+
}
27+
}
28+
29+
}

dgrv4_Gateway_serv/src/main/java/tpi/dgrv4/dpaa/component/DgrProtocol.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import java.util.regex.Matcher;
88
import java.util.regex.Pattern;
99
import java.util.stream.Collectors;
10-
import java.util.stream.IntStream;
1110

11+
@SuppressWarnings("java:S5998")
1212
@Builder
1313
public record DgrProtocol(
1414
Boolean valid,
@@ -21,8 +21,8 @@ public record DgrProtocol(
2121
boolean mtls
2222
) {
2323

24-
private final static String rex = "^dgr(\\+[-a-zA-Z]+)+##(.+)";
25-
private final static Pattern pattern = Pattern.compile(rex);
24+
private static final String rex = "^dgr(\\+[-a-zA-Z]+)+##(.+)";
25+
private static final Pattern pattern = Pattern.compile(rex);
2626

2727
public static DgrProtocol parse(String url) {
2828
var validation = validation(url);

0 commit comments

Comments
 (0)