#!/bin/bash # 浠艾福(CFC) 后端启动脚本 # JVM 参数: G1GC, 512m初始堆, 2g最大堆 # 用法: ./start.sh [--debug] DEBUG_FLAG="" if [ "$1" = "--debug" ]; then DEBUG_FLAG="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=n" fi cd "$(dirname "$0")" exec java \ $DEBUG_FLAG \ -Xms512m \ -Xmx2g \ -XX:+UseG1GC \ -XX:MaxGCPauseMillis=200 \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:HeapDumpPath=/tmp/cfc-heapdump.hprof \ -Dfile.encoding=UTF-8 \ -Dspring.profiles.active=prod \ -jar target/cfc-backend-1.0.0.jar