From 8fc8468219f87bb584312e77b7c0bf889874bbfb Mon Sep 17 00:00:00 2001 From: haoxr <1490493387@qq.com> Date: Wed, 19 May 2021 20:46:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0dockerfile=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mall-ums/ums-boot/Dockerfile | 6 ++++ mall-ums/ums-boot/pom.xml | 36 +++++++------------ youlai-admin/admin-boot/Dockerfile | 6 ++++ youlai-admin/admin-boot/pom.xml | 35 ++++++------------ .../youlai/admin/mapper/SysUserMapper.java | 2 +- 5 files changed, 36 insertions(+), 49 deletions(-) create mode 100644 mall-ums/ums-boot/Dockerfile create mode 100644 youlai-admin/admin-boot/Dockerfile diff --git a/mall-ums/ums-boot/Dockerfile b/mall-ums/ums-boot/Dockerfile new file mode 100644 index 000000000..5fd4451e6 --- /dev/null +++ b/mall-ums/ums-boot/Dockerfile @@ -0,0 +1,6 @@ +FROM openjdk:8-jdk-alpine +VOLUME /tmp +ADD target/ums-boot.jar ums-boot.jar +ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/ums-boot.jar"] +EXPOSE 8100 +RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \&& echo 'Asia/Shanghai' >/etc/timezone \ No newline at end of file diff --git a/mall-ums/ums-boot/pom.xml b/mall-ums/ums-boot/pom.xml index 3584a7f21..e2c217a2b 100644 --- a/mall-ums/ums-boot/pom.xml +++ b/mall-ums/ums-boot/pom.xml @@ -104,6 +104,7 @@ ${artifactId} + org.springframework.boot @@ -112,45 +113,31 @@ com.spotify docker-maven-plugin - 1.0.0 + 1.2.2 + + - - - --> + - - ${project.artifactId} - + latest - - openjdk:8-jdk-alpine - - - / - - ["java","-jar","${project.build.finalName}.jar"] - - - https://c.youlai.tech:2376 - - C:\cert\docker\c.youlai.tech - - + + ${project.basedir}/src/main/docker + true / - ${project.build.directory} - ${project.build.finalName}.jar @@ -158,4 +145,5 @@ + diff --git a/youlai-admin/admin-boot/Dockerfile b/youlai-admin/admin-boot/Dockerfile new file mode 100644 index 000000000..6e96e3cd4 --- /dev/null +++ b/youlai-admin/admin-boot/Dockerfile @@ -0,0 +1,6 @@ +FROM openjdk:8-jdk-alpine +VOLUME /tmp +ADD target/admin-boot.jar admin-boot.jar +ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/admin-boot.jar"] +EXPOSE 8100 +RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \&& echo 'Asia/Shanghai' >/etc/timezone \ No newline at end of file diff --git a/youlai-admin/admin-boot/pom.xml b/youlai-admin/admin-boot/pom.xml index cf07d5d1c..73bbd2fad 100644 --- a/youlai-admin/admin-boot/pom.xml +++ b/youlai-admin/admin-boot/pom.xml @@ -101,6 +101,7 @@ ${artifactId} + org.springframework.boot @@ -109,45 +110,31 @@ com.spotify docker-maven-plugin - 1.0.0 + 1.2.2 + + - - - --> + - - ${project.artifactId} - + latest - - openjdk:8-jdk-alpine - - - / - - ["java","-jar","${project.build.finalName}.jar"] - - - https://f.youlai.tech:2376 - - C:\cert\docker\f.youlai.tech - - + + ${project.basedir}/src/main/docker + true / - ${project.build.directory} - ${project.build.finalName}.jar diff --git a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/mapper/SysUserMapper.java b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/mapper/SysUserMapper.java index c17970ee0..f39e5a29e 100644 --- a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/mapper/SysUserMapper.java +++ b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/mapper/SysUserMapper.java @@ -20,7 +20,7 @@ public interface SysUserMapper extends BaseMapper { " left join sys_dept d on u.dept_id= d.id " + " left join sys_user_role ur on u.id=ur.user_id " + " left join sys_role r on ur.role_id=r.id " + - " where deleted != 1 " + + " where u.deleted != 1 " + " " + " and u.username like concat('%',#{user.username},'%')" + " " +