Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mq-man
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
M. A. Rased
mq-man
Commits
c5368c4c
Commit
c5368c4c
authored
Dec 31, 2025
by
Bina Kandel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
application upgraded to Spring Boot 4 and Java 25
parent
0056283d
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
115 additions
and
51 deletions
+115
-51
.gitignore
.gitignore
+4
-0
build.gradle
build.gradle
+9
-6
gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.jar
+0
-0
gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
+1
-1
gradlew
gradlew
+14
-16
gradlew.bat
gradlew.bat
+13
-12
run-remove-stomp.bat
run-remove-stomp.bat
+2
-2
run-remove.bat
run-remove.bat
+2
-2
run.bat
run.bat
+2
-2
settings.gradle
settings.gradle
+1
-1
DeadLetterApplication.java
src/main/java/pmis/mq/DeadLetterApplication.java
+1
-1
DeadLetterQueueService.java
src/main/java/pmis/mq/DeadLetterQueueService.java
+3
-4
PolicyData.java
src/main/java/pmis/mq/dto/PolicyData.java
+1
-1
QueueData.java
src/main/java/pmis/mq/dto/QueueData.java
+1
-1
QueueResponse.java
src/main/java/pmis/mq/dto/QueueResponse.java
+1
-1
logback.xml
src/main/resources/logback.xml
+59
-0
DeadLetterApplicationTests.java
src/test/java/pmis/mq/DeadLetterApplicationTests.java
+1
-1
No files found.
.gitignore
View file @
c5368c4c
...
...
@@ -35,3 +35,6 @@ out/
### VS Code ###
.vscode/
Logs/**
ConsoleLogs/**
\ No newline at end of file
build.gradle
View file @
c5368c4c
plugins
{
id
'org.springframework.boot'
version
'3.3.2'
id
'io.spring.dependency-management'
version
'1.1.6'
id
'java'
id
'org.springframework.boot'
version
'4.0.0'
id
'io.spring.dependency-management'
version
'1.1.7'
}
group
=
'com.example'
version
=
'0.0.1-SNAPSHOT'
sourceCompatibility
=
'21'
java
.
toolchain
{
languageVersion
.
set
(
JavaLanguageVersion
.
of
(
25
))
// Optional: vendor.set(JvmVendorSpec.[VENDOR])
}
repositories
{
mavenCentral
()
...
...
@@ -14,11 +17,11 @@ repositories {
dependencies
{
implementation
'org.springframework.boot:spring-boot-starter-amqp'
testImplementation
'org.springframework.boot:spring-boot-starter-test'
implementation
'org.springframework.boot:spring-boot-starter-restclient'
implementation
'org.springframework.boot:spring-boot-starter-test'
testImplementation
'org.springframework.amqp:spring-rabbit-test'
implementation
'org.springframework.boot:spring-boot-starter-json'
// https://mvnrepository.com/artifact/org.json/json
implementation
group:
'org.json'
,
name:
'json'
,
version:
'20240303'
implementation
'org.json:json:20250517'
}
...
...
gradle/wrapper/gradle-wrapper.jar
View file @
c5368c4c
No preview for this file type
gradle/wrapper/gradle-wrapper.properties
View file @
c5368c4c
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
8.9-all
.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
9.2.1-bin
.zip
networkTimeout
=
10000
validateDistributionUrl
=
true
zipStoreBase
=
GRADLE_USER_HOME
...
...
gradlew
View file @
c5368c4c
#!/bin/sh
#
# Copyright © 2015
-2021
the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
...
...
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/
subprojects/plugins
/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/
platforms/jvm/plugins-application
/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
...
...
@@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME
=
${
0
##*/
}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME
=
$(
cd
"
${
APP_HOME
:-
./
}
"
>
/dev/null
&&
pwd
-P
)
||
exit
APP_HOME
=
$(
cd
-P
"
${
APP_HOME
:-
./
}
"
>
/dev/null
&&
printf
'%s\n'
"
$PWD
"
)
||
exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD
=
maximum
...
...
@@ -112,7 +114,6 @@ case "$( uname )" in #(
NONSTOP
*
)
nonstop
=
true
;;
esac
CLASSPATH
=
$APP_HOME
/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
...
...
@@ -145,7 +146,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case
$MAX_FD
in
#(
max
*
)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC
2039,SC
3045
MAX_FD
=
$(
ulimit
-H
-n
)
||
warn
"Could not query maximum file descriptor limit"
esac
...
...
@@ -153,7 +154,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
''
|
soft
)
:
;;
#(
*
)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC
2039,SC
3045
ulimit
-n
"
$MAX_FD
"
||
warn
"Could not set maximum file descriptor limit to
$MAX_FD
"
esac
...
...
@@ -170,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if
"
$cygwin
"
||
"
$msys
"
;
then
APP_HOME
=
$(
cygpath
--path
--mixed
"
$APP_HOME
"
)
CLASSPATH
=
$(
cygpath
--path
--mixed
"
$CLASSPATH
"
)
JAVACMD
=
$(
cygpath
--unix
"
$JAVACMD
"
)
...
...
@@ -202,16 +202,15 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS
=
'"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command
;
# *
$DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
#
shell script including quotes and variable substitutions, so put them in
#
double quotes to make sure that they get re-expanded; and
#
* put everything else in single quotes, so that it's not re-expanded
.
# Collect all arguments for the java command
:
# *
DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
#
and any embedded shellness will be escaped.
#
* For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
#
treated as '${Hostname}' itself on the command line
.
set
--
\
"-Dorg.gradle.appname=
$APP_BASE_NAME
"
\
-classpath
"
$CLASSPATH
"
\
org.gradle.wrapper.GradleWrapperMain
\
-jar
"
$APP_HOME
/gradle/wrapper/gradle-wrapper.jar"
\
"
$@
"
# Stop when "xargs" is not available.
...
...
@@ -246,4 +245,4 @@ eval "set -- $(
tr
'\n'
' '
)
"
'"$@"'
exec
"
$JAVACMD
"
"
$@
"
\ No newline at end of file
exec
"
$JAVACMD
"
"
$@
"
gradlew.bat
View file @
c5368c4c
...
...
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
...
...
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo.
1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
1>&2
echo.
1>&2
echo Please set the JAVA_HOME variable in your environment to match the
1>&2
echo location of your Java installation.
1>&2
goto fail
...
...
@@ -57,22 +59,21 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo.
1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
1>&2
echo.
1>&2
echo Please set the JAVA_HOME variable in your environment to match the
1>&2
echo location of your Java installation.
1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -
classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain
%*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -
jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar"
%*
:end
@rem End local scope for the variables with windows NT shell
...
...
run-remove-stomp.bat
View file @
c5368c4c
java -jar .\build\libs\dead-letter-0.0.1-SNAPSHOT.jar remove-stomp
\ No newline at end of file
java -jar .\build\libs\mq-man-0.0.1-SNAPSHOT.jar remove-stomp
\ No newline at end of file
run-remove.bat
View file @
c5368c4c
java -jar .\build\libs\dead-letter-0.0.1-SNAPSHOT.jar remove
\ No newline at end of file
java -jar .\build\libs\mq-man-0.0.1-SNAPSHOT.jar remove
\ No newline at end of file
run.bat
View file @
c5368c4c
java -jar .\build\libs\dead-letter-0.0.1-SNAPSHOT.jar
\ No newline at end of file
java -jar .\build\libs\mq-man-0.0.1-SNAPSHOT.jar
\ No newline at end of file
settings.gradle
View file @
c5368c4c
rootProject
.
name
=
'
dead-letter
'
rootProject
.
name
=
'
mq-man
'
src/main/java/
com/example/deadletter
/DeadLetterApplication.java
→
src/main/java/
pmis/mq
/DeadLetterApplication.java
View file @
c5368c4c
package
com
.
example
.
deadletter
;
package
pmis
.
mq
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
...
src/main/java/
com/example/deadletter
/DeadLetterQueueService.java
→
src/main/java/
pmis/mq
/DeadLetterQueueService.java
View file @
c5368c4c
package
com
.
example
.
deadletter
;
package
pmis
.
mq
;
import
com.example.deadletter
.dto.PolicyData
;
import
com.example.deadletter
.dto.QueueData
;
import
pmis.mq
.dto.PolicyData
;
import
pmis.mq
.dto.QueueData
;
import
org.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.ParameterizedTypeReference
;
...
...
@@ -11,7 +11,6 @@ import org.springframework.web.client.HttpClientErrorException;
import
org.springframework.web.client.RestTemplate
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
DeadLetterQueueService
{
...
...
src/main/java/
com/example/deadletter
/dto/PolicyData.java
→
src/main/java/
pmis/mq
/dto/PolicyData.java
View file @
c5368c4c
package
com
.
example
.
deadletter
.
dto
;
package
pmis
.
mq
.
dto
;
public
class
PolicyData
{
String
name
;
...
...
src/main/java/
com/example/deadletter
/dto/QueueData.java
→
src/main/java/
pmis/mq
/dto/QueueData.java
View file @
c5368c4c
package
com
.
example
.
deadletter
.
dto
;
package
pmis
.
mq
.
dto
;
public
class
QueueData
{
String
name
;
...
...
src/main/java/
com/example/deadletter
/dto/QueueResponse.java
→
src/main/java/
pmis/mq
/dto/QueueResponse.java
View file @
c5368c4c
package
com
.
example
.
deadletter
.
dto
;
package
pmis
.
mq
.
dto
;
import
java.util.List
;
...
...
src/main/resources/logback.xml
0 → 100644
View file @
c5368c4c
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property
name=
"LOGS"
value=
"."
/>
<!-- Create console logs and logs folder at project root-->
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<appender
name=
"Console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
%d{yyyy-MM-dd} %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"RollingFile"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${LOGS}/Logs/ErrorLogs.log
</file>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
ERROR
</level>
</filter>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<Pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</encoder>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<!-- rollover daily and when the file reaches 2 MegaBytes -->
<fileNamePattern>
${LOGS}/Logs/archived/%d{yyyy-MM, aux}/ErrorLogs-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<maxFileSize>
2 MB
</maxFileSize>
<maxHistory>
1
</maxHistory>
</rollingPolicy>
</appender>
<!-- to save all console logs in log file -->
<appender
name=
"File"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${LOGS}/ConsoleLogs/Logs.log
</file>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<Pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</encoder>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<!-- organizes log folders by year and month but roll-over log files every day at midnight -->
<fileNamePattern>
${LOGS}/ConsoleLogs/archive/%d{yyyy-MM, aux}/Logs-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<!-- each file should be at most 2MB-->
<maxFileSize>
2MB
</maxFileSize>
</rollingPolicy>
</appender>
<!-- LOG everything at INFO level -->
<root
level=
"info"
>
<appender-ref
ref=
"RollingFile"
/>
<appender-ref
ref=
"Console"
/>
<appender-ref
ref=
"File"
/>
</root>
<logger
name=
"pmis.mq"
level=
"trace"
additivity=
"false"
>
<appender-ref
ref=
"RollingFile"
/>
<appender-ref
ref=
"Console"
/>
<appender-ref
ref=
"File"
/>
</logger>
</configuration>
\ No newline at end of file
src/test/java/
com/example/deadletter
/DeadLetterApplicationTests.java
→
src/test/java/
pmis/mq
/DeadLetterApplicationTests.java
View file @
c5368c4c
package
com
.
example
.
deadletter
;
package
pmis
.
mq
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.boot.test.context.SpringBootTest
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment