Skip to content

Commit abdda49

Browse files
committed
feat: Upgraded to Spring Boot 3.5.7, Gradle 9.1.0, Java 25, and replaced with Tomcat; added charts to the homepage dashboard; added an idle countdown reminder; added password change upon first login; added client-side password strength settings; allowed custom sub-versions for AC OIDC IdPs and enabled login without recognizing IdP Type; optimized Basic Auth and ClientCredential performance; removed customization and Line alerts; fixed Mail template and API registration copying issues; and fixed Mocktest errors.
1 parent ac1cb90 commit abdda49

3,764 files changed

Lines changed: 263756 additions & 259356 deletions

File tree

Some content is hidden

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

.github/workflows/release_asset_upload.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ env:
1212
QUICKSTART_VERSION: 1.3.8
1313
TEMP_DIR: ${{ github.workspace }}/temp
1414
DOWNLOADS_DIR: ${{ github.workspace }}/downloads
15-
MAC_JRE_URL: https://cdn.azul.com/zulu/bin/zulu21.42.19-ca-jre21.0.7-macosx_aarch64.zip
16-
WIN_JRE_URL: https://cdn.azul.com/zulu/bin/zulu21.42.19-ca-jre21.0.7-win_x64.zip
15+
MAC_JRE_URL: https://cdn.azul.com/zulu/bin/zulu25.30.17-ca-jre25.0.1-macosx_aarch64.zip
16+
WIN_JRE_URL: https://cdn.azul.com/zulu/bin/zulu25.30.17-ca-jre25.0.1-win_x64.zip
1717

1818
jobs:
1919
build_and_upload_assets:
@@ -27,10 +27,10 @@ jobs:
2727
with:
2828
ref: ${{ github.event.release.tag_name }}
2929

30-
- name: Set up Zulu JDK 21
30+
- name: Set up Zulu JDK 25
3131
uses: actions/setup-java@v4
3232
with:
33-
java-version: '21'
33+
java-version: '25'
3434
distribution: 'zulu'
3535

3636
- name: Build with Gradle
@@ -87,8 +87,8 @@ jobs:
8787
run: |
8888
unzip -q ${{ env.DOWNLOADS_DIR }}/win/java_jre.zip -d ${{ env.TEMP_DIR }}/win && rm ${{ env.DOWNLOADS_DIR }}/win/java_jre.zip
8989
unzip -q ${{ env.DOWNLOADS_DIR }}/mac/java_jre.zip -d ${{ env.TEMP_DIR }}/mac && rm ${{ env.DOWNLOADS_DIR }}/mac/java_jre.zip
90-
mv ${{ env.TEMP_DIR }}/win/zulu21.42.19-ca-jre21.0.7-win_x64 ${{ env.TEMP_DIR }}/win/jre
91-
mv ${{ env.TEMP_DIR }}/mac/zulu21.42.19-ca-jre21.0.7-macosx_aarch64 ${{ env.TEMP_DIR }}/mac/jre
90+
mv ${{ env.TEMP_DIR }}/win/zulu25.30.17-ca-jre25.0.1-win_x64 ${{ env.TEMP_DIR }}/win/jre
91+
mv ${{ env.TEMP_DIR }}/mac/zulu25.30.17-ca-jre25.0.1-macosx_aarch64 ${{ env.TEMP_DIR }}/mac/jre
9292
echo "ls -l ${{ env.TEMP_DIR }}/win/jre"
9393
ls -l ${{ env.TEMP_DIR }}/win/jre
9494
echo "ls -l ${{ env.TEMP_DIR }}/mac/jre"
@@ -132,8 +132,8 @@ jobs:
132132
body: |
133133
### Files:
134134
- `${{ env.H2_PACKAGE_NAME }}.zip`: digirunner with dependencies and H2 database package
135-
- `${{ env.MAC_ARM64_PACKAGE_NAME }}.zip`: Package with TPIsoftwareOSPO/quickstart MacOS ARM64 portable and Azul Zulu Java 21 JRE
136-
- `${{ env.WIN_AMD64_PACKAGE_NAME }}.zip`: Package with TPIsoftwareOSPO/quickstart Windows AMD64 quickstart portable and Azul Zulu Java 21 JRE
135+
- `${{ env.MAC_ARM64_PACKAGE_NAME }}.zip`: Package with TPIsoftwareOSPO/quickstart MacOS ARM64 portable and Azul Zulu Java 25 JRE
136+
- `${{ env.WIN_AMD64_PACKAGE_NAME }}.zip`: Package with TPIsoftwareOSPO/quickstart Windows AMD64 quickstart portable and Azul Zulu Java 25 JRE
137137
### References:
138138
- TPIsoftwareOSPO/quickstart: [v${{ env.QUICKSTART_VERSION }}](https://github.com/TPIsoftwareOSPO/quickstart/releases/tag/v${{ env.QUICKSTART_VERSION }})
139139
files: |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM azul/zulu-openjdk-alpine:21-jre-headless-latest
1+
FROM azul/zulu-openjdk-alpine:25
22

33
RUN set -eux; \
44
apk update; \

build.gradle

Lines changed: 47 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
1-
buildscript {
2-
repositories {
3-
maven {
4-
url "https://plugins.gradle.org/m2/"
5-
}
6-
}
7-
dependencies {
8-
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.5.0.2730"
9-
}
10-
}
11-
121
plugins {
13-
id 'org.springframework.boot' version '3.4.9'
14-
id 'io.spring.dependency-management' version '1.1.6'
2+
id 'org.springframework.boot' version '3.5.7'
3+
id 'io.spring.dependency-management' version '1.1.7'
154
id 'com.github.jk1.dependency-license-report' version '2.9'
165

17-
id "org.sonarqube" version "5.1.0.4882"
6+
id "org.sonarqube" version "7.0.1.6134"
187
id 'com.google.protobuf' version '0.9.4'
198
id "jacoco"
209
id 'java'
2110
}
2211

23-
jar {
12+
bootJar {
2413
enabled false
2514
}
2615

@@ -31,23 +20,29 @@ licenseReport {
3120
allowedLicensesFile = project.layout.projectDirectory.file("${rootDir}/.tmp/allowed-licenses.json").asFile
3221
}
3322

34-
35-
3623
allprojects {
3724
group = 'tpi.dgrv4'
38-
version = 'release-rc-v4.5.19.0-4-g052aa0662'
25+
version = 'release-rc-v4.7.3.5'
3926
apply plugin: 'io.spring.dependency-management'
40-
27+
4128
repositories {
4229
mavenCentral()
4330
}
44-
31+
4532
// 指定編碼 UTF-8
46-
tasks.withType(JavaCompile) {
33+
tasks.withType(JavaCompile).configureEach {
4734
options.encoding = "UTF-8"
35+
}
36+
tasks.withType(Test).tap {
37+
configureEach {
38+
systemProperty "file.encoding", "UTF-8"
39+
}
4840
}
49-
tasks.withType(Test) {
50-
systemProperty "file.encoding", "UTF-8"
41+
}
42+
43+
sonarqube {
44+
properties {
45+
property "sonar.cpd.exclusions", "**/vo/**"
5146
}
5247
}
5348

@@ -57,13 +52,15 @@ subprojects {
5752
apply plugin: 'java-library'
5853
apply plugin: 'eclipse'
5954

60-
sourceCompatibility = '21'
61-
targetCompatibility = '21'
62-
55+
java {
56+
toolchain {
57+
languageVersion = JavaLanguageVersion.of(25)
58+
}
59+
}
6360

6461
dependencies {
65-
implementation files("${rootDir}/libsext/dgrv4_CodecUtil-v4.5.19.0-4-g052aa0662-lib.jar")
66-
implementation files("${rootDir}/libsext/dgrv4_HttpUtil-v4.5.19.0-4-g052aa0662-lib.jar")
62+
implementation files("${rootDir}/libsext/dgrv4_CodecUtil-v4.7.3.5-lib.jar")
63+
implementation files("${rootDir}/libsext/dgrv4_HttpUtil-v4.7.3.5-lib.jar")
6764

6865
implementation ('org.springframework.boot:spring-boot-starter-data-jpa'){
6966
//CVE-2025-41249
@@ -73,42 +70,38 @@ subprojects {
7370
}
7471

7572
// Correct the above exclusions, CVE-2025-41249
76-
implementation 'org.springframework:spring-core:6.2.11'
73+
implementation 'org.springframework:spring-core:6.2.11'
7774
// Correct the above exclusions, CVE-2025-11226
7875
implementation 'ch.qos.logback:logback-core:1.5.19'
7976

80-
implementation ('org.springframework.boot:spring-boot-starter-web'){
81-
exclude group:'org.apache.tomcat.embed', module:'tomcat-embed-core'
82-
}
83-
84-
// 修正上方排除的 org.apache.tomcat.embed:tomcat-embed-core
85-
implementation 'org.apache.tomcat.embed:tomcat-embed-core:11.0.12'
86-
87-
// 添加 Undertow (乾淨的 undertow) , 預計升級 springboot v3.4.0
88-
implementation ('org.springframework.boot:spring-boot-starter-undertow'){}
77+
implementation 'org.springframework.boot:spring-boot-starter-web'
8978

9079
implementation 'org.jboss.xnio:xnio-nio:3.8.16.Final'
9180
implementation 'jakarta.servlet:jakarta.servlet-api:6.1.0'
9281

9382
compileOnly 'com.h2database:h2'
94-
compileOnly 'org.projectlombok:lombok:1.18.32'
95-
annotationProcessor 'org.projectlombok:lombok:1.18.32'
83+
compileOnly 'org.projectlombok:lombok:1.18.42'
84+
annotationProcessor 'org.projectlombok:lombok:1.18.42'
9685
implementation 'commons-io:commons-io:2.16.1'
9786
// CVE-2025-8885,CVE-2025-12194
9887
implementation 'org.bouncycastle:bc-fips:2.1.2'
9988

10089
implementation 'org.bouncycastle:bcpkix-fips:2.1.9'
10190
}
102-
91+
10392
// clear lib
104-
task myClearLib(type: Delete) {
105-
delete "$buildDir/libs/lib"
106-
delete "$buildDir/libs/libsext"
107-
}
108-
93+
// 使用 tasks.register 以符合 Gradle 新版推薦寫法
94+
tasks.register('myClearLib', Delete) {
95+
delete layout.buildDirectory.dir("libs/lib")
96+
delete layout.buildDirectory.dir("libs/libsext")
97+
}
98+
10999
// copy lib
110-
task myCopyLib(dependsOn:resolveMainClassName, type: Copy) {
111-
//task myCopyLib(type: Copy) {
100+
tasks.register('myCopyLib', Copy) {
101+
dependsOn tasks.named('resolveMainClassName')
102+
// 修正衝突:確保測試執行完後才進行複製動作
103+
mustRunAfter tasks.named('test')
104+
112105
from(configurations.runtimeClasspath){
113106
include '**/*.jar'
114107
exclude '**/dgrv4*.jar'
@@ -198,9 +191,6 @@ project(':dgrv4_Gateway_serv'){
198191
}
199192
//修正上方排除的CVE-2025-41254
200193
implementation 'org.springframework:spring-websocket:6.2.12'
201-
202-
implementation 'io.undertow:undertow-core:2.3.17.Final'
203-
implementation 'io.undertow:undertow-websockets-jsr:2.3.17.Final'
204194

205195
implementation 'com.github.oshi:oshi-core:6.4.5'
206196
implementation 'net.java.dev.jna:jna:5.13.0'
@@ -219,19 +209,7 @@ project(':dgrv4_Gateway_serv'){
219209

220210
// 修正上方排除的
221211
compileOnly 'com.google.protobuf:protobuf-java:3.25.5'
222-
223-
implementation ('org.owasp.esapi:esapi:2.7.0.0'){
224-
exclude group:'commons-beanutils', module:'commons-beanutils'
225-
exclude group:'commons-fileupload', module:'commons-fileupload'
226-
exclude group:'commons-lang', module:'commons-lang'
227-
exclude group:'commons-configuration', module:'commons-configuration'
228-
}
229-
230-
// Correct the above exclusions, group:'commons-beanutils', module:'commons-beanutils'
231-
implementation 'commons-beanutils:commons-beanutils:1.11.0'
232-
// Correct the above exclusions, group:'commons-fileupload', module:'commons-fileupload'
233-
implementation 'commons-fileupload:commons-fileupload:1.6.0'
234-
212+
235213
// gRPC Proxy
236214
implementation 'net.devh:grpc-server-spring-boot-starter:2.15.0.RELEASE'
237215
implementation 'io.grpc:grpc-netty-shaded:1.75.0'
@@ -301,7 +279,7 @@ project(':dgrv4_Gateway_serv'){
301279
bootJar {
302280
dependsOn createVersionTxt
303281

304-
archivesBaseName = "digiRunner"
282+
archiveBaseName = "digiRunner"
305283

306284
dependsOn myClearLib
307285
dependsOn (myCopyLib)
@@ -346,7 +324,7 @@ project(':dgrv4_Common_lib'){
346324
exclude "**/*.xml"
347325

348326
archiveClassifier = 'lib' // 去除 postfix = plain 字樣
349-
archivesBaseName = "dgrv4-common"
327+
archiveBaseName = "dgrv4-common"
350328
if (project.hasProperty("version")) {
351329
archiveVersion = version + '-' + getDate() //換版時修改
352330
}
@@ -377,7 +355,7 @@ project(':dgrv4_Entity_lib'){
377355
exclude "**/*.xml"
378356

379357
archiveClassifier = 'lib' // 去除 postfix = plain 字樣
380-
archivesBaseName = "dgrv4_Entity"
358+
archiveBaseName = "dgrv4_Entity"
381359
if (project.hasProperty("version")) {
382360
archiveVersion = version + '-' + getDate() //換版時修改
383361
}
@@ -404,7 +382,7 @@ project(':dgrv4_H2Config_lib'){
404382
exclude "**/*.xml"
405383

406384
archiveClassifier = 'lib' // 去除 postfix = plain 字樣
407-
archivesBaseName = "dgrv4_H2Config" // ** Copy 使用後記得改名字 **
385+
archiveBaseName = "dgrv4_H2Config" // ** Copy 使用後記得改名字 **
408386
if (project.hasProperty("version")) {
409387
archiveVersion = version + '-' + getDate() //換版時修改
410388
}
@@ -434,7 +412,7 @@ project(':dgrv4_KeeperServer_lib'){
434412
exclude "**/*.xml"
435413

436414
archiveClassifier = 'lib' // 去除 postfix = plain 字樣
437-
archivesBaseName = "dgrv4_KeeperServer"
415+
archiveBaseName = "dgrv4_KeeperServer"
438416
if (project.hasProperty("version")) {
439417
archiveVersion = version + '-' + getDate() //換版時修改
440418
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=25
3+
org.eclipse.jdt.core.compiler.compliance=25
4+
org.eclipse.jdt.core.compiler.source=25

dgrv4_Common_lib/bin/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/main/
2-
/test/
1+
/main/
2+
/test/
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package tpi.dgrv4.aws.ifs;
2-
3-
import tpi.dgrv4.common.keeper.ITPILogger;
4-
5-
public interface IdgRaws {
6-
public Boolean awsApi(String productCode, Integer publicKeyVersion, String nonce, String keyStr, ITPILogger tl)
7-
throws Exception ;
8-
9-
public String getRegisterUsageResult() ;
10-
}
1+
package tpi.dgrv4.aws.ifs;
2+
3+
import tpi.dgrv4.common.keeper.ITPILogger;
4+
5+
public interface IdgRaws {
6+
public Boolean awsApi(String productCode, Integer publicKeyVersion, String nonce, String keyStr, ITPILogger tl)
7+
throws Exception ;
8+
9+
public String getRegisterUsageResult() ;
10+
}
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
package tpi.dgrv4.common.component;
2-
3-
import java.io.File;
4-
import java.util.regex.Matcher;
5-
6-
import org.springframework.stereotype.Component;
7-
8-
@Component
9-
public class CommonFileHelper {
10-
11-
/**
12-
* 替換分隔符為系統預設
13-
* @param path
14-
* @param isTruncateLeadingSeperator
15-
* @return
16-
*/
17-
public static final String filterPath(String path, boolean isTruncateLeadingSeperator) {
18-
if (path != null) {
19-
path = path.replaceAll("(\\\\+|/+)", Matcher.quoteReplacement(File.separator));
20-
if (isTruncateLeadingSeperator) {
21-
path = path.replaceFirst("^" + Matcher.quoteReplacement(File.separator), "");
22-
}
23-
}
24-
return path;
25-
}
26-
27-
}
1+
package tpi.dgrv4.common.component;
2+
3+
import java.io.File;
4+
import java.util.regex.Matcher;
5+
6+
import org.springframework.stereotype.Component;
7+
8+
@Component
9+
public class CommonFileHelper {
10+
11+
/**
12+
* 替換分隔符為系統預設
13+
* @param path
14+
* @param isTruncateLeadingSeperator
15+
* @return
16+
*/
17+
public static final String filterPath(String path, boolean isTruncateLeadingSeperator) {
18+
if (path != null) {
19+
path = path.replaceAll("(\\\\+|/+)", Matcher.quoteReplacement(File.separator));
20+
if (isTruncateLeadingSeperator) {
21+
path = path.replaceFirst("^" + Matcher.quoteReplacement(File.separator), "");
22+
}
23+
}
24+
return path;
25+
}
26+
27+
}

0 commit comments

Comments
 (0)