From 3ed79a5512b1ee551bedb7338ca43c9d0409f28e Mon Sep 17 00:00:00 2001 From: Number7 <1845377266@qq.com> Date: Sat, 27 Jul 2024 12:43:34 +0800 Subject: [PATCH] =?UTF-8?q?CI/CD=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 14 ++++++++++++++ pom.xml | 18 ++++++++++-------- .../com/muyu/auth/service/SysLoginService.java | 2 -- 3 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d266333 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +#指定构建镜像的起始镜像 +FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6 +#执行一些必备的条件 +# home +# app.jar 启动jar包 +# logs 日志文件 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone +#挂载工作目录 +VOLUME ["/home/logs/cloud-auth"] +#拷贝执行文件 +COPY ./target/cloud-auth.jar /home/app.jar +ENTRYPOINT ["java","-jar"] +CMD ["/home/app.jar"] diff --git a/pom.xml b/pom.xml index 89a4537..b42cd93 100644 --- a/pom.xml +++ b/pom.xml @@ -3,13 +3,15 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> com.muyu - cloud-server + cloud-server-parent 3.6.3 4.0.0 cloud-auth + 1.0.0 + cloud-auth认证授权中心 @@ -75,13 +77,13 @@ - - org.apache.maven.plugins - maven-deploy-plugin - - true - - + + + + + + + diff --git a/src/main/java/com/muyu/auth/service/SysLoginService.java b/src/main/java/com/muyu/auth/service/SysLoginService.java index ff0af1a..0a23474 100644 --- a/src/main/java/com/muyu/auth/service/SysLoginService.java +++ b/src/main/java/com/muyu/auth/service/SysLoginService.java @@ -1,5 +1,4 @@ package com.muyu.auth.service; - import com.muyu.common.core.constant.CacheConstants; import com.muyu.common.core.constant.Constants; import com.muyu.common.core.constant.SecurityConstants; @@ -17,7 +16,6 @@ import com.muyu.common.system.domain.SysUser; import com.muyu.common.system.domain.LoginUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; - /** * 登录校验方法 *