Compare commits
No commits in common. 'main' and 'dev' have entirely different histories.
@ -0,0 +1,22 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
|
||||
# .git 과 .cache 폴더를 무시
|
||||
.git
|
||||
.cache
|
||||
|
||||
# ignore all *.class files in all folders, including build root
|
||||
# 모든 폴더안에 있는 모든, *.class 파일들을 무시
|
||||
**/*.class
|
||||
|
||||
# 모든 마크다운 파일들 (md) 파일들을 무시,
|
||||
# 모든 README*.md 파일 무시
|
||||
*.md
|
||||
IREADME*.md
|
||||
|
||||
.gradle
|
||||
build
|
||||
.idea
|
||||
out
|
||||
work
|
||||
data
|
@ -0,0 +1,74 @@
|
||||
name: Deploy to Amazon EC2(github -> package -> EC2 docker image)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ] # push할 때 동작할 branch를 입력해주세요.
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
logLevel:
|
||||
description: 'Log level'
|
||||
required: true
|
||||
default: 'debug'
|
||||
tags:
|
||||
description: 'Run action'
|
||||
required: true
|
||||
default: 'Run '
|
||||
env:
|
||||
#DOCKER_IMAGE: ghcr.io/{Repository author}/{Repository name} # 예를 들면, ghcr.io/dolphago/github-follow-unfollow
|
||||
DOCKER_IMAGE: ghcr.io/${{ github.actor }}/xit-framework
|
||||
VERSION: ${{ github.sha }}
|
||||
NAME: xit-framework-bo
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out source code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up docker buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Cache docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ env.VERSION }} # runner 설정에서 읽어들일거에요.
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- name: Login to ghcr
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GIT_ACS_TOKEN }}
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
push: true #${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ env.DOCKER_IMAGE }}:${{ env.VERSION }}
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
name: Deploy
|
||||
runs-on: [ self-hosted, label-development ]
|
||||
steps:
|
||||
- name: Login to ghcr
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GIT_ACS_TOKEN }}
|
||||
- name: Docker run
|
||||
#docker ps -q --filter "name=xit-framework-bo" | grep -q . && docker stop xit-framework-bo && docker rm -fv xit-framework-bo
|
||||
#docker run -d -p 8090:8090 --name xit-framework-bo --restart always ${{ env.DOCKER_IMAGE }}:${{ env.VERSION }}
|
||||
#docker run -d -p 8090:8090 --name xit-framework-bo --restart always ${{ env.DOCKER_IMAGE }}:${{ env.VERSION }}
|
||||
#docker ps -q --filter "name=xit-framework-bo" | grep -q . && docker stop xit-framework-bo && docker rm -fv xit-framework-bo
|
||||
#docker stop ${{ env.NAME }} && docker rm ${{ env.NAME }} && docker rmi ${{ env.DOCKER_IMAGE }}:latest
|
||||
run: |
|
||||
docker run -d -p 8090:8090 --name ${{ env.NAME }} --restart always ${{ env.DOCKER_IMAGE }}:${{ env.VERSION }}
|
||||
sleep 5
|
||||
docker image prune -a
|
||||
sleep 5
|
@ -0,0 +1,46 @@
|
||||
FROM gradle:7-jdk8 AS build
|
||||
WORKDIR /application
|
||||
COPY --chown=gradle:gradle ./ ./
|
||||
#COPY ./ ./
|
||||
#RUN chmod +x ./gradlew
|
||||
RUN gradle clean bootWar
|
||||
|
||||
FROM openjdk:8-jre-slim
|
||||
WORKDIR /app
|
||||
COPY --from=build /application/build/libs/*.war ./ROOT.war
|
||||
EXPOSE 8090
|
||||
#ENTRYPOINT ["java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Dspring.profiles.active=dev","-jar"," /app/ROOT.war"]
|
||||
ENTRYPOINT ["java", "-jar", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Dspring.profiles.active=dev", "/app/ROOT.war"]
|
||||
#ENTRYPOINT ["java", "-Dspring.profiles.active=dev", "-jar", "/application/build/libs/core-0.0.1-SNAPSHOT.war"]
|
||||
|
||||
#FROM openjdk:8-jdk-alpine as builder
|
||||
#WORKDIR application
|
||||
#COPY ./ ./
|
||||
#RUN chmod +x ./gradlew
|
||||
##--args='--spring.profiles.active=dev'
|
||||
#RUN ./gradlew clean bootWar
|
||||
##CMD["./gradlew", "-Dspring.profiles.active=local", "clean", "bootWar"]
|
||||
#
|
||||
#EXPOSE 8090 8443
|
||||
#ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=dev", "/application/build/libs/core-0.0.1-SNAPSHOT.war"]
|
||||
|
||||
#FROM postgres
|
||||
#FROM tomcat:9.0
|
||||
#ENV TZ="Asia/Seoul"
|
||||
#RUN ln -fns /usr/share/zoneinfo/$TZ /etc/localtime
|
||||
#RUN echo $TZ > /etc/timezone
|
||||
#CMD ["/usr/local/tomcat/bin/catalina.sh", "stop"]
|
||||
#CMD sleep 3
|
||||
#
|
||||
#RUN rm -rf /usr/local/tomcat/webapps/ROOT
|
||||
#COPY --from=builder /application/build/libs/core-0.0.1-SNAPSHOT.war /usr/local/tomcat/webapps/ROOT.war
|
||||
#EXPOSE 8090 8443
|
||||
#CMD ["/usr/local/tomcat/bin/catalina.sh", "run"]
|
||||
|
||||
#FROM tomcat:9.0
|
||||
#ENV TZ="Asia/Seoul"
|
||||
#RUN ln -fns /usr/share/zoneinfo/$TZ /etc/localtime
|
||||
#RUN echo $TZ > /etc/timezone
|
||||
##RUN rm -rf /usr/local/tomcat/webapps/ROOT
|
||||
#COPY repo/target/kuaa-management.war /usr/local/tomcat/webapps/ROOT.war
|
||||
#EXPOSE 8009 8080 8443
|
@ -0,0 +1,148 @@
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('Git Pull') {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
//echo 'prepare'
|
||||
//git branch: "master", credentialsId: "$GIT_CREDENTIALS_ID", url: 'git@github.com:minuk926/xit-framework.git/'
|
||||
git branch: 'master', url: 'git@github.com:minuk926/xit-framework.git', credentialsId: 'jenkins_aws_connect_key'
|
||||
sh rm -rf .git
|
||||
sh 'ls -al'
|
||||
env.cloneResult=true
|
||||
} catch (error) {
|
||||
print(error)
|
||||
env.cloneResult=false
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build WAR') {
|
||||
when {
|
||||
expression {
|
||||
return env.cloneResult ==~ /(?i)(Y|YES|T|TRUE|ON|RUN)/
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script{
|
||||
try {
|
||||
sh """
|
||||
rm -rf deploy
|
||||
mkdir deploy
|
||||
"""
|
||||
sh "sudo sed -i \"s/module_name=.*/module_name=${env.JOB_NAME}\\:${env.BUILD_NUMBER}/g\" /var/lib/jenkins/workspace/${env.JOB_NAME}/src/main/resources/application.properties"
|
||||
sh "cat /var/lib/jenkins/workspace/${env.JOB_NAME}/src/main/resources/application.properties"
|
||||
sh 'gradlew clean bootWar'
|
||||
sh """
|
||||
cd deploy
|
||||
cp /var/lib/jenkins/workspace/${env.JOB_NAME}/build/libs/*.war ./ROOT.war
|
||||
"""
|
||||
env.gradleBuildResult=true
|
||||
} catch (error) {
|
||||
print(error)
|
||||
echo 'Remove Deploy Files'
|
||||
sh "sudo rm -rf /var/lib/jenkins/workspace/${env.JOB_NAME}/*"
|
||||
env.gradleBuildResult=false
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
slackSend channel: '#pipeline-deploy', color: 'good', message: "The pipeline ${currentBuild.fullDisplayName} stage Build WAR successfully."
|
||||
}
|
||||
failure {
|
||||
slackSend channel: '#pipeline-deploy', color: 'danger', message: "The pipeline ${currentBuild.fullDisplayName} stage Build WAR failed."
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Docker Build'){
|
||||
when {
|
||||
expression {
|
||||
return env.mavenBuildResult ==~ /(?i)(Y|YES|T|TRUE|ON|RUN)/
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script{
|
||||
try {
|
||||
sh"""
|
||||
#!/bin/bash
|
||||
cd ./deploy
|
||||
cat>Dockerfile<<-EOF
|
||||
FROM ${ECR_BASE_URL}:latest
|
||||
ADD ${env.JOB_NAME}.jar /home/${env.JOB_NAME}.jar
|
||||
CMD nohup java -jar /home/${env.JOB_NAME}.jar 1> /dev/null 2>&1
|
||||
EXPOSE 9000
|
||||
EOF"""
|
||||
sh"""
|
||||
cd ./deploy
|
||||
docker rmi -f \$(docker images -q)
|
||||
\$(aws ecr get-login --no-include-email --region ap-northeast-2)
|
||||
docker build -t ${SERVICE_NAME.toLowerCase()} .
|
||||
docker tag ${SERVICE_NAME.toLowerCase()}:latest ${ECR_TASK_URL}:ver${env.BUILD_NUMBER}
|
||||
docker push ${ECR_TASK_URL}:ver${env.BUILD_NUMBER}
|
||||
"""
|
||||
echo 'Remove Deploy Files'
|
||||
sh "sudo rm -rf /var/lib/jenkins/workspace/${env.JOB_NAME}/*"
|
||||
env.dockerBuildResult=true
|
||||
} catch (error) {
|
||||
print(error)
|
||||
echo 'Remove Deploy Files'
|
||||
sh "sudo rm -rf /var/lib/jenkins/workspace/${env.JOB_NAME}/*"
|
||||
env.dockerBuildResult=false
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
slackSend channel: '#jenkins', color: 'good', message: "The pipeline ${currentBuild.fullDisplayName} stage Docker Build successfully."
|
||||
}
|
||||
failure {
|
||||
slackSend channel: '#jenkins', color: 'danger', message: "The pipeline ${currentBuild.fullDisplayName} stage Docker Build failed."
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Deploy'){
|
||||
when {
|
||||
expression {
|
||||
return env.dockerBuildResult ==~ /(?i)(Y|YES|T|TRUE|ON|RUN)/
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script{
|
||||
try {
|
||||
withAWS(credentials:"$AWS_CREDENTIALS") {
|
||||
sh "aws ecs describe-task-definition --task-definition ${TASK_DEFINITION} --region ap-northeast-2 --query \"taskDefinition.{\"family\": family, \"containerDefinitions\": containerDefinitions, \"executionRoleArn\": executionRoleArn,\"requiresCompatibilities\": requiresCompatibilities}\" --output json > task-definition.json"
|
||||
def task_repository_name = sh(
|
||||
script:"""
|
||||
echo \"${ECR_TASK_URL}\" | awk \'{ split(\$0, arr, \"/\"); print arr[2] }\'
|
||||
""",
|
||||
returnStdout: true
|
||||
).trim()
|
||||
sh "sudo sed -i \"9s/${task_repository_name}:.*/${task_repository_name}:ver${env.BUILD_NUMBER}\\\",/g\" task-definition.json"
|
||||
sh "cat task-definition.json"
|
||||
sh "aws ecs register-task-definition --cli-input-json file://task-definition.json --region ap-northeast-2"
|
||||
sh "aws ecs update-service --cluster ${CLUSTER_NAME} --service ${SERVICE_NAME} --task-definition ${TASK_DEFINITION} --region ap-northeast-2"
|
||||
}
|
||||
} catch (error) {
|
||||
print(error)
|
||||
echo 'Remove Deploy Files'
|
||||
sh "sudo rm -rf /var/lib/jenkins/workspace/${env.JOB_NAME}/*"
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
slackSend channel: '#jenkins', color: 'good', message: "The pipeline ${currentBuild.fullDisplayName} successfully."
|
||||
}
|
||||
failure {
|
||||
slackSend channel: '#jenkins', color: 'danger', message: "The pipeline ${currentBuild.fullDisplayName} failed."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
version: 0.0
|
||||
os: linux
|
||||
|
||||
files:
|
||||
- source: /
|
||||
destination: /home/ubuntu/admin/bo # 배포 파일 도착 폴더
|
||||
overwrite: yes # 안돼면, 아래 hooks BeforeInstall 추가, 파일 삭제
|
||||
permissions:
|
||||
- object: /
|
||||
pattern: "**" # 모든 파일의 권한 설정
|
||||
owner: ubuntu
|
||||
group: ubuntu
|
||||
# mode: 755
|
||||
|
||||
hooks:
|
||||
# BeforeInstall: "BeforeInstallHookFunctionName"
|
||||
# AfterInstall: "AfterInstallHookFunctionName"
|
||||
# ApplicationStop:
|
||||
# - timeout: 2
|
||||
ApplicationStart: # 파일이 도착 후 실행
|
||||
- location: deploy.sh
|
||||
timeout: 60 # 60 안에 실행, 60 뒤엔 배포 실패로 변경
|
||||
runas: ubuntu
|
||||
# ValidateService: # deplo 실행 후, 빌드파일이 배포가 되었다면, 서버체크
|
||||
# - location: server-check.sh
|
||||
# timeout: 60
|
Binary file not shown.
Before Width: | Height: | Size: 110 KiB |
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
REPOSITORY=/home/ubuntu/xit-framework/bo
|
||||
cd $REPOSITORY
|
||||
|
||||
APP_NAME=xit-framework-bo
|
||||
WAR_NAME=$(ls $REPOSITORY | grep '.war' | tail -n 1)
|
||||
WAR_PATH=$REPOSITORY/$WAR_NAME
|
||||
echo "> war 파일명: $WAR_NAME" >> /home/ubuntu/xit-framework/bo/deploy.log
|
||||
echo "> war 파일명: $WAR_PATH" >> /home/ubuntu/xit-framework/bo/deploy.log
|
||||
|
||||
CURRENT_PID=$(pgrep -f $APP_NAME)
|
||||
echo "> CURRENT_PID : $CURRENT_PID" >> /home/ubuntu/xit-framework/bo/deploy.log
|
||||
|
||||
if [ -z $CURRENT_PID ]
|
||||
then
|
||||
echo "> 종료할것 없음."
|
||||
else
|
||||
echo "> kill -9 $CURRENT_PID"
|
||||
kill -9 $CURRENT_PID
|
||||
sleep 5
|
||||
fi
|
||||
rm -rf work/
|
||||
echo "> $WAR_PATH 배포"
|
||||
nohup java -jar -Dspring.profiles.active=local $WAR_PATH > /dev/null 2> /dev/null < /dev/null &
|
@ -0,0 +1,27 @@
|
||||
version: "3"
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8090:8090"
|
||||
stdin_open: true
|
||||
# volumes:
|
||||
# - /app/node_modules
|
||||
# - ./backend:/app
|
||||
# environment:
|
||||
# MYSQL_HOST: mysql
|
||||
# MYSQL_USER: root
|
||||
# MYSQL_ROOT_PASSWORD: johnahn777
|
||||
# MYSQL_DATABASE: myapp
|
||||
# MYSQL_PORT: 3306
|
||||
#
|
||||
#
|
||||
# nginx:
|
||||
# restart: always
|
||||
# build:
|
||||
# dockerfile: ../Dockerfile
|
||||
# context: ./nginx
|
||||
# ports:
|
||||
# - "3000:80"
|
@ -1,72 +0,0 @@
|
||||
package com.xit.biz.ctgy.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Schema(name = "ParkingImageDto", description = "")
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ParkingImageDto {
|
||||
@Schema(title = "진술서파일1", example = " ", description = " ")
|
||||
private String scFrecad1;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scFrecad2;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scFrecad3;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scFrecad4;
|
||||
|
||||
@Schema(title = "첨부자료1", example = " ", description = " ")
|
||||
private String scContad1;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scContad2;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scContad3;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scContad4;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scContad5;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scContad6;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scContad7;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scContad8;
|
||||
|
||||
@Schema(title = "단속사진1", example = " ", description = " ")
|
||||
private String scPicad1;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scPicad2;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scPicad3;
|
||||
|
||||
@Schema(title = " ", example = " ", description = " ")
|
||||
private String scPicad4;
|
||||
|
||||
@Schema(required = false, title = "단속사진파일", example = " ", description = "단속사진파일")
|
||||
private MultipartFile[] picadFiles;
|
||||
|
||||
@Schema(required = false, title = "진술서파일", example = " ", description = "진술서파일")
|
||||
private MultipartFile[] frecadFiles;
|
||||
|
||||
@Schema(required = false, title = "첨부자료파일", example = " ", description = "첨부자료파일")
|
||||
private MultipartFile[] contadFiles;
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
package com.xit.biz.ctgy.v2.repository;
|
||||
|
||||
import com.xit.biz.ctgy.dto.MinUserinfoDto;
|
||||
import com.xit.biz.ctgy.entity.MinUserinfo;
|
||||
import com.xit.core.config.database.BaseMpowerDaoSupport;
|
||||
import com.xit.core.oauth2.config.properties.SlaveDatabaseProperties;
|
||||
import com.xit.core.support.sql.parser.QueryGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
@Slf4j
|
||||
public class UserSubDao extends BaseMpowerDaoSupport {
|
||||
private static final String NAME_SPACE = "userSub";
|
||||
|
||||
public UserSubDao(SlaveDatabaseProperties databaseProperties) {
|
||||
super(databaseProperties);
|
||||
}
|
||||
|
||||
public void insertMinUserinfoDto(@NotNull final MinUserinfoDto dto) {
|
||||
final String sql = QueryGenerator.createNamedQuery(NAME_SPACE, "insertMinUserinfo")
|
||||
.setParameter("userid", dto.getUserid())
|
||||
.setParameter("accesstype", dto.getAccesstype())
|
||||
.setParameter("email", dto.getEmail())
|
||||
.setParameter("isenable", dto.getIsenable())
|
||||
.setParameter("mphone", dto.getMphone())
|
||||
.setParameter("name", dto.getName())
|
||||
.setParameter("passwd", dto.getPasswd())
|
||||
.setParameter("regdate", dto.getRegdate())
|
||||
.setParameter("team", dto.getTeam())
|
||||
.setParameter("gu", dto.getGu())
|
||||
.getQueryString();
|
||||
insert(sql);
|
||||
}
|
||||
|
||||
public void updateMinUserinfoDto(MinUserinfoDto dto) {
|
||||
final String sql = QueryGenerator.createNamedQuery(NAME_SPACE, "updateMinUserinfo")
|
||||
.setParameter("userid", dto.getUserid())
|
||||
.setParameter("accesstype", dto.getAccesstype())
|
||||
.setParameter("email", dto.getEmail())
|
||||
.setParameter("mphone", dto.getMphone())
|
||||
.setParameter("name", dto.getName())
|
||||
.setParameter("passwd", dto.getPasswd())
|
||||
.setParameter("team", dto.getTeam())
|
||||
.getQueryString();
|
||||
update(sql);
|
||||
}
|
||||
|
||||
public void insertMinUserinfo(@NotNull final MinUserinfo dto) {
|
||||
final String sql = QueryGenerator.createNamedQuery(NAME_SPACE, "insertMinUserinfo")
|
||||
.setParameter("userid", dto.getUserid())
|
||||
.setParameter("accesstype", dto.getAccesstype())
|
||||
.setParameter("email", dto.getEmail())
|
||||
.setParameter("isenable", dto.getIsenable())
|
||||
.setParameter("mphone", dto.getMphone())
|
||||
.setParameter("name", dto.getName())
|
||||
.setParameter("passwd", dto.getPasswd())
|
||||
.setParameter("regdate", dto.getRegdate())
|
||||
.setParameter("team", dto.getTeam())
|
||||
.setParameter("gu", dto.getGu())
|
||||
.getQueryString();
|
||||
insert(sql);
|
||||
}
|
||||
|
||||
public void updateMinUserinfo(MinUserinfo dto) {
|
||||
final String sql = QueryGenerator.createNamedQuery(NAME_SPACE, "updateMinUserinfo")
|
||||
.setParameter("userid", dto.getUserid())
|
||||
.setParameter("accesstype", dto.getAccesstype())
|
||||
.setParameter("email", dto.getEmail())
|
||||
.setParameter("mphone", dto.getMphone())
|
||||
.setParameter("name", dto.getName())
|
||||
.setParameter("passwd", dto.getPasswd())
|
||||
.setParameter("team", dto.getTeam())
|
||||
.getQueryString();
|
||||
update(sql);
|
||||
}
|
||||
|
||||
public void removeMinUserinfo(@NotNull final MinUserinfoDto dto) {
|
||||
final String sql = QueryGenerator.createNamedQuery(NAME_SPACE, "updateMinUserinfoIsenable")
|
||||
.setParameter("userid", dto.getUserid())
|
||||
.setParameter("isenable", dto.getIsenable())
|
||||
.getQueryString();
|
||||
update(sql);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package com.xit.core.oauth2.config.properties;
|
||||
|
||||
public interface IDatabaseProperties {
|
||||
String getHostIp();
|
||||
String getDbName();
|
||||
int getPort();
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.xit.core.oauth2.config.properties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ConfigurationProperties(prefix = "mpower.master")
|
||||
public class MasterDatabaseProperties implements IDatabaseProperties{
|
||||
private String hostIp;
|
||||
private int port;
|
||||
private String dbName;
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.xit.core.oauth2.config.properties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ConfigurationProperties(prefix = "mpower.slave")
|
||||
public class SlaveDatabaseProperties implements IDatabaseProperties{
|
||||
private String hostIp;
|
||||
private int port;
|
||||
private String dbName;
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
server:
|
||||
port: 8090
|
||||
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: prod
|
||||
|
||||
sql:
|
||||
init:
|
||||
mode: always
|
||||
|
||||
# ==================================================================================================================
|
||||
# logging lib setting
|
||||
# ==================================================================================================================
|
||||
logging:
|
||||
level:
|
||||
root: INFO
|
||||
# spring.mvc.log-request-details=debug 활성화
|
||||
web: debug
|
||||
org:
|
||||
springframework:
|
||||
transaction:
|
||||
interceptor: TRACE
|
||||
orm:
|
||||
jpa: TRACE
|
||||
|
||||
# ==================================================================================================================
|
||||
# Spring-doc 활성
|
||||
# ==================================================================================================================
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: true
|
||||
|
||||
|
||||
# ==================================================================================================================
|
||||
# project config
|
||||
# ==================================================================================================================
|
||||
cors:
|
||||
allowed-origins: https://fonts.gstatic.com,http://localhost,http://211.35.57.20:3000
|
||||
|
||||
# api response logging 여부
|
||||
api:
|
||||
response:
|
||||
logging: false
|
||||
|
||||
file:
|
||||
cmm:
|
||||
upload:
|
||||
root: d:/
|
||||
# root: /Users/minuk/data/file/upload
|
||||
# 공지사항
|
||||
pboard: /simUpFile #/kangnamSIM/simUpFile
|
||||
simsaPath: /simUpFile_sc1, /simUpFile_sc2 # 거주자 simUpFile_sc1, 장애인 simUpFile_sc2
|
||||
url: http://traffic.gangnam.go.kr
|
||||
allow:
|
||||
ext:
|
||||
max:
|
||||
size: 10000000
|
||||
|
||||
mpower:
|
||||
master:
|
||||
hostIp: 127.0.0.1
|
||||
port: 2500
|
||||
dbName: default
|
||||
slave:
|
||||
hostIp: 127.0.0.1
|
||||
port: 2500
|
||||
dbName: gn_seconddb
|
||||
file:
|
||||
hostIp: 127.0.0.1
|
||||
port: 2500
|
||||
serviceName: XitFile.XitDownload
|
||||
# 주정차이미지경로-mpower
|
||||
parkingImagePath: D:/jucha_ftp/JUCHA_PHOTO/
|
||||
# 주정차이미지 다운로드 저장 경로
|
||||
savedImgPath: D:/data/file/juchaPhoto
|
@ -0,0 +1,51 @@
|
||||
server:
|
||||
port: 18080
|
||||
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: test
|
||||
sql:
|
||||
init:
|
||||
mode: always
|
||||
platform: h2
|
||||
|
||||
datasource:
|
||||
driver-class-name: org.h2.Driver
|
||||
url: jdbc:h2:mem:xitdb;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
||||
username: sa
|
||||
password: ''
|
||||
hikari:
|
||||
driver-class-name: ${spring.datasource.driver-class-name}
|
||||
jdbc-url: ${spring.datasource.url}
|
||||
username: ${spring.datasource.username}
|
||||
password: ${spring.datasource.password}
|
||||
|
||||
jpa:
|
||||
database-platform: org.hibernate.dialect.H2Dialect
|
||||
show-sql: false
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: true
|
||||
use_sql_comments: false
|
||||
hbm2ddl:
|
||||
auto: create-drop
|
||||
|
||||
decorator:
|
||||
datasource:
|
||||
p6spy:
|
||||
enable-logging: true
|
||||
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
org:
|
||||
hibernate:
|
||||
type: trace
|
||||
springframework:
|
||||
web:
|
||||
filter: error
|
||||
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: false
|
@ -0,0 +1,33 @@
|
||||
xit:
|
||||
api:
|
||||
url: 'http://localhost:${server.port}'
|
||||
version: '@project.version@'
|
||||
# Authentification 저장 위치 : header / cookie / token
|
||||
auth:
|
||||
save:
|
||||
type: header
|
||||
# locale : ko / en
|
||||
locale: ko
|
||||
|
||||
# api response logging 여부
|
||||
api:
|
||||
reponse:
|
||||
logging: true
|
||||
|
||||
file:
|
||||
cmm:
|
||||
upload:
|
||||
root: c:/data/file/upload
|
||||
# root: /Users/minuk/data/file/upload
|
||||
# 공지사항
|
||||
path: /kangnamSIM/simUpFile
|
||||
publicPath: /simUpFile #/kangnamSIM/simUpFile
|
||||
simsaPath: /simUpFile_sc1, /simUpFile_sc2 # 거주자 simUpFile_sc1, 장애인 simUpFile_sc2
|
||||
url: http://traffic.gangnam.go.kr
|
||||
allow:
|
||||
ext:
|
||||
max:
|
||||
size: 10000000
|
||||
|
||||
mpower:
|
||||
dbName: gn
|
@ -1,8 +0,0 @@
|
||||
사진경로 : D:/jucha_ftp/JUCHA_PHOTO/
|
||||
|
||||
주정차심의대상목록
|
||||
조건 추가 필요
|
||||
AND MS_CDATE>=SYSDATE
|
||||
|
||||
주정차 관리자 심의 결과 저장 시 프로시저 호출
|
||||
SIMSA_EDIT_RESULT
|
@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity-mappings namespace="userSub">
|
||||
|
||||
<native-query id="insertMinUserinfo">
|
||||
/* minusersubinfo-mapper|insertMinUserinfo|julim */
|
||||
INSERT
|
||||
INTO min_userinfo (
|
||||
userid
|
||||
, accesstype
|
||||
, email
|
||||
, gu
|
||||
, isenable
|
||||
, mphone
|
||||
, name
|
||||
, passwd
|
||||
, regdate
|
||||
, team
|
||||
) VALUES (
|
||||
#{userid}
|
||||
, #{accesstype}
|
||||
, #{email}
|
||||
, #{gu}
|
||||
, #{isenable}
|
||||
, #{mphone}
|
||||
, #{name}
|
||||
, #{passwd}
|
||||
, #{regdate}
|
||||
, #{team}
|
||||
)
|
||||
</native-query>
|
||||
|
||||
<native-query id="updateMinUserinfo">
|
||||
/* minusersubinfo-mapper|updateMinUserinfo|julim */
|
||||
UPDATE min_userinfo
|
||||
SET accesstype = #{accesstype}
|
||||
, team = #{team}
|
||||
, name = #{name}
|
||||
, mphone = #{mphone}
|
||||
, email = #{email}
|
||||
, passwd = #{passwd}
|
||||
WHERE userid= #{userid}
|
||||
</native-query>
|
||||
|
||||
<native-query id="updateMinUserinfoIsenable">
|
||||
/* minusersubinfo-mapper|updateMinUserinfoIsenable|julim */
|
||||
UPDATE min_userinfo
|
||||
SET isenable = #{isenable}
|
||||
WHERE userid= #{userid}
|
||||
</native-query>
|
||||
|
||||
</entity-mappings>
|
Loading…
Reference in New Issue