xiatian 2 vuotta sitten
vanhempi
commit
0a92e7dd72

+ 10 - 0
jenkins.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+pwd
+
+cp target/marking-paper-struct.jar ~/project/marking-paper-struct/marking-paper-struct
+BUILD_ID=DONTKILLME
+bash ~/project/marking-paper-struct/marking-paper-struct/stop.sh
+sleep 5s
+bash ~/project/marking-paper-struct/marking-paper-struct/start.sh
+echo "finished..."

+ 1 - 0
shell/start.args

@@ -0,0 +1 @@
+--spring.profiles.active=dev

+ 29 - 0
shell/start.sh

@@ -0,0 +1,29 @@
+#!/bin/bash
+
+FILE_PATH=$(cd `dirname $0`; pwd)
+
+
+APP_MAIN_JAR="marking-paper-struct.jar"
+
+JAVA_OPTS=`cat $FILE_PATH/start.vmoptions`
+APP_ARGS=`cat $FILE_PATH/start.args`
+
+PID_LIST=`ps -ef|grep $APP_MAIN_JAR|grep java|awk '{print $2}'`
+
+if [ ! -z "$PID_LIST" ]; then
+    echo "[ERROR] : APP is already running!"
+    exit -1
+fi
+
+
+
+echo "java options:"
+echo "$JAVA_OPTS"
+echo "args:"
+echo "$APP_ARGS"
+    
+nohup java $JAVA_OPTS -jar $FILE_PATH/$APP_MAIN_JAR $APP_ARGS >/dev/null 2>&1 &
+
+echo "starting......"
+
+exit 0

+ 1 - 0
shell/start.vmoptions

@@ -0,0 +1 @@
+-server -Xms256m -Xmx256m -XX:-UseGCOverheadLimit -Dlog.commonLevel=INFO

+ 17 - 0
shell/stop.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+FILE_PATH=$(cd `dirname $0`; pwd)
+
+APP_MAIN_JAR="marking-paper-struct.jar"
+
+PID_LIST=`ps -ef|grep $APP_MAIN_JAR|grep java|awk '{print $2}'`
+
+if [ ! -z "$PID_LIST" ]; then
+    echo "Runnable jar is $APP_MAIN_JAR."
+    for PID in $PID_LIST 
+    do
+        kill -9 $PID
+    done
+    echo "stopped !"
+fi
+
+exit 0

+ 7 - 3
src/main/resources/application-test.properties

@@ -10,11 +10,11 @@ com.qmth.mybatis.logLevel=debug
 #
 # ********** db config **********
 #
-db.host=localhost
+db.host=192.168.10.83
 db.port=3306
 db.database=marking_paper_struct
-com.qmth.datasource.username=marking_paper_struct
-com.qmth.datasource.password=marking_paper_struct
+com.qmth.datasource.username=scan
+com.qmth.datasource.password=scan
 com.qmth.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.database}?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2b8&rewriteBatchedStatements=true
 
 #
@@ -23,6 +23,10 @@ com.qmth.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.database}?useUni
 com.qmth.logging.root-level=info
 com.qmth.logging.file-path=/home/admin/project/marking-paper-struct/log/marking-paper-struct.log
 
+#DISK
+com.qmth.fss.config=/home/admin/project/marking-paper-struct/static
+com.qmth.fss.server=http://localhost:7101/file
+
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
 spring.jackson.time-zone=GMT+8
 

+ 3 - 3
src/main/resources/application.properties

@@ -10,11 +10,11 @@ com.qmth.mybatis.logLevel=debug
 #
 # ********** db config **********
 #
-db.host=localhost
+db.host=192.168.10.83
 db.port=3306
 db.database=marking_paper_struct
-com.qmth.datasource.username=marking_paper_struct
-com.qmth.datasource.password=marking_paper_struct
+com.qmth.datasource.username=scan
+com.qmth.datasource.password=scan
 com.qmth.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.database}?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2b8&rewriteBatchedStatements=true
 
 #