diff --git a/Jenkinsfile b/Jenkinsfile
index af1de04..bf0ac08 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -81,8 +81,9 @@ spec:
def OTEL_ENV = (TARGET_ENV == 'dev') ? 'dev' : (TARGET_ENV == 'stage') ? 'stage' : 'prod'
def OTEL_SERVICE_NAME = (TARGET_ENV == 'dev') ? 'sayit-helpdesk-dev' : (TARGET_ENV == 'stage') ? 'sayit-helpdesk-stage' : 'sayit-helpdesk'
- def IMAGE_TAG = "${TARGET_ENV}-${env.BUILD_NUMBER}" // dev-123 / stage-123 / prod-123
- def LATEST_TAG = "latest-${TARGET_ENV}" // latest-dev / latest-stage / latest-prod
+ def IMAGE_TAG_PREFIX = (env.JOB_NAME?.contains('session')) ? "${TARGET_ENV}-session" : TARGET_ENV
+ def IMAGE_TAG = "${IMAGE_TAG_PREFIX}-${env.BUILD_NUMBER}" // dev-123 / dev-session-123
+ def LATEST_TAG = "latest-${IMAGE_TAG_PREFIX}" // latest-dev / latest-dev-session
timestamps {
@@ -157,4 +158,4 @@ spec:
}
}
}
-}
\ No newline at end of file
+}
diff --git a/k8s/dev/session-redis.yaml b/k8s/dev/session-redis.yaml
new file mode 100644
index 0000000..29031d3
--- /dev/null
+++ b/k8s/dev/session-redis.yaml
@@ -0,0 +1,67 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: sayit-helpdesk-session-redis
+ namespace: sayit-helpdesk-dev
+ labels:
+ app: sayit-helpdesk-session-redis
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: sayit-helpdesk-session-redis
+ template:
+ metadata:
+ labels:
+ app: sayit-helpdesk-session-redis
+ spec:
+ containers:
+ - name: redis
+ image: redis:7.2-alpine
+ imagePullPolicy: IfNotPresent
+ args:
+ - redis-server
+ - --save
+ - ""
+ - --appendonly
+ - "no"
+ ports:
+ - name: redis
+ containerPort: 6379
+ readinessProbe:
+ tcpSocket:
+ port: redis
+ initialDelaySeconds: 3
+ periodSeconds: 5
+ timeoutSeconds: 2
+ failureThreshold: 3
+ livenessProbe:
+ tcpSocket:
+ port: redis
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ timeoutSeconds: 2
+ failureThreshold: 3
+ resources:
+ requests:
+ cpu: 50m
+ memory: 64Mi
+ limits:
+ cpu: 500m
+ memory: 256Mi
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: sayit-helpdesk-session-redis
+ namespace: sayit-helpdesk-dev
+ labels:
+ app: sayit-helpdesk-session-redis
+spec:
+ type: ClusterIP
+ selector:
+ app: sayit-helpdesk-session-redis
+ ports:
+ - name: redis
+ port: 6379
+ targetPort: redis
diff --git a/pom.xml b/pom.xml
index ab71e92..b75aa68 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,6 +20,7 @@
2.1
1.9.13
4.5.2
+ 1.3.5.RELEASE
@@ -130,6 +131,25 @@
egovframework.rte.fdl.property
${egovframework.rte.version}
+
+
+ org.springframework.session
+ spring-session-data-redis
+ ${spring.session.version}
+
+
+ commons-logging
+ commons-logging
+
+
+
+
+
+ org.springframework
+ spring-oxm
+ ${spring.maven.artifact.version}
+
+
@@ -801,4 +821,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/resources/egovframework/egovProps/globals-dev.properties b/src/main/resources/egovframework/egovProps/globals-dev.properties
index 4f61ab4..6a58aeb 100644
--- a/src/main/resources/egovframework/egovProps/globals-dev.properties
+++ b/src/main/resources/egovframework/egovProps/globals-dev.properties
@@ -152,3 +152,11 @@ ldap.url =ldap://localhost:10389
ldap.rootDn =c=kr
ldap.username =uid=admin,ou=system
ldap.password =secret
+
+# Spring Session Redis
+Session.Redis.Host=sayit-helpdesk-session-redis
+Session.Redis.Port=6379
+Session.Redis.Database=0
+Session.Redis.Timeout=2000
+Session.Redis.Namespace=sayit-helpdesk-dev:session
+Session.Redis.MaxInactiveIntervalInSeconds=36000
diff --git a/src/main/resources/egovframework/egovProps/globals-prod.properties b/src/main/resources/egovframework/egovProps/globals-prod.properties
index 9fd72d2..ca2cec8 100644
--- a/src/main/resources/egovframework/egovProps/globals-prod.properties
+++ b/src/main/resources/egovframework/egovProps/globals-prod.properties
@@ -150,3 +150,11 @@ ldap.url =ldap://localhost:10389
ldap.rootDn =c=kr
ldap.username =uid=admin,ou=system
ldap.password =secret
+
+# Spring Session Redis
+Session.Redis.Host=sayit-helpdesk-session-redis
+Session.Redis.Port=6379
+Session.Redis.Database=0
+Session.Redis.Timeout=2000
+Session.Redis.Namespace=sayit-helpdesk:session
+Session.Redis.MaxInactiveIntervalInSeconds=36000
diff --git a/src/main/resources/egovframework/egovProps/globals-stage.properties b/src/main/resources/egovframework/egovProps/globals-stage.properties
index e7e5a0d..e605343 100644
--- a/src/main/resources/egovframework/egovProps/globals-stage.properties
+++ b/src/main/resources/egovframework/egovProps/globals-stage.properties
@@ -145,3 +145,11 @@ ldap.url =ldap://localhost:10389
ldap.rootDn =c=kr
ldap.username =uid=admin,ou=system
ldap.password =secret
+
+# Spring Session Redis
+Session.Redis.Host=sayit-helpdesk-session-redis
+Session.Redis.Port=6379
+Session.Redis.Database=0
+Session.Redis.Timeout=2000
+Session.Redis.Namespace=sayit-helpdesk-stage:session
+Session.Redis.MaxInactiveIntervalInSeconds=36000
diff --git a/src/main/resources/egovframework/spring/com/context-session.xml b/src/main/resources/egovframework/spring/com/context-session.xml
new file mode 100644
index 0000000..c0ad53d
--- /dev/null
+++ b/src/main/resources/egovframework/spring/com/context-session.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index ab40fcc..cb95042 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -1,6 +1,14 @@
Default
+
+ springSessionRepositoryFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
+
+ springSessionRepositoryFilter
+ /*
+
encodingFilter
org.springframework.web.filter.CharacterEncodingFilter