diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 613259d..8b6fa26 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,9 +5,11 @@ - + + + - + + @@ -183,6 +186,8 @@ + + diff --git a/Shanghai b/Shanghai new file mode 100644 index 0000000..91f6f8b Binary files /dev/null and b/Shanghai differ diff --git a/docker_init.sh b/docker_init.sh new file mode 100644 index 0000000..844e897 --- /dev/null +++ b/docker_init.sh @@ -0,0 +1,23 @@ +#docker init +#docker desktop 以 docket compose 单机卓面的方式运行 + +#maven环境初始化,如果项目根目录下没有.mvn文件夹,需要执行此命令,如果有了就不用执行些命令 +mvn wrapper:wrapper + +#初始化 +docker init +#会有如下提示 +#? What application platform does your project use? Java +#? What's the relative directory (with a leading .) for your app? ./src +#? What version of Java do you want to use? 17 +#? What port does your server listen on? 8080 + +#编译springboot项目、打包成docker镜像并运行 +docker compose up --build -d + +#停止容器 +docker compose down + + +#COPY ./Shanghai /etc/localtime +#COPY ./timezone /etc/timezone \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 5af6775..ad2b69b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -15,7 +15,7 @@ spring: # username: sa # password: Skyinno251, #url: jdbc:mysql://192.168.3.29:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true - #url: jdbc:mysql://127.0.0.1:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true + url: jdbc:mysql://127.0.0.1:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true #url: jdbc:mysql://192.168.2.18:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true #url: jdbc:mysql://192.168.1.92:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true #url: jdbc:mysql://192.168.3.7:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true @@ -24,7 +24,7 @@ spring: #url: jdbc:mysql://192.168.3.24:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true #url: jdbc:mysql://192.168.1.24:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true #url: jdbc:mysql://47.242.184.139:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true - url: jdbc:mysql://192.168.3.9:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true + #url: jdbc:mysql://192.168.3.9:3306/appserver?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true driverClassName: com.mysql.cj.jdbc.Driver #com.mysql.cj.jdbc.Driver com.mysql.jdbc.Driver username: root password: Skyinno251, diff --git a/timezone b/timezone new file mode 100644 index 0000000..421b7a4 --- /dev/null +++ b/timezone @@ -0,0 +1 @@ +Asia/Shanghai