From 0bb060b27336190a33b0313f3e5be809cdfaf555 Mon Sep 17 00:00:00 2001 From: cuijiawang Date: Thu, 31 Jul 2025 16:06:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor(admin):=20=E9=87=8D=E6=9E=84=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20Docker=20=E6=94=AF=E6=8C=81=20-=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=BA=94=E7=94=A8=E7=AB=AF=E5=8F=A3=E4=B8=BA=2018080?= =?UTF-8?q?=20-=20=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=BD=BF=E7=94=A8=E5=8A=A0=E5=AF=86=E5=87=AD?= =?UTF-8?q?=E6=8D=AE=20-=20=E8=B0=83=E6=95=B4=20Redis=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=20-=20=E6=B7=BB=E5=8A=A0=20Jasypt=20=E5=8A=A0=E5=AF=86?= =?UTF-8?q?=E5=99=A8=E9=85=8D=E7=BD=AE=20-=20=E6=96=B0=E5=A2=9E=20Dockerfi?= =?UTF-8?q?le=20=E7=94=A8=E4=BA=8E=E6=9E=84=E5=BB=BA=20Docker=20=E9=95=9C?= =?UTF-8?q?=E5=83=8F=20-=20=E6=9B=B4=E6=96=B0=20Maven=20=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=20Jasypt=20=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 +++++ .../src/main/resources/application-dev.yml | 31 +++++++++---------- .../src/main/resources/application.yml | 2 +- agileboot-common/pom.xml | 7 +++++ 4 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9f6416f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM amazoncorretto:17 +ADD agileboot-admin/target/agileboot-admin-1.0.0.jar /agileboot-admin.jar + +EXPOSE 18080 +#ENV CONTEXT_PATH / +# ENV NACOS_ENABLED true +RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone +ENTRYPOINT ["java", "-jar", "/agileboot-admin.jar"] diff --git a/agileboot-admin/src/main/resources/application-dev.yml b/agileboot-admin/src/main/resources/application-dev.yml index d23c85c..33f191d 100644 --- a/agileboot-admin/src/main/resources/application-dev.yml +++ b/agileboot-admin/src/main/resources/application-dev.yml @@ -50,25 +50,21 @@ spring: datasource: # 主库数据源 master: - url: jdbc:mysql://localhost:33067/agileboot-pure?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: 12345 + url: jdbc:mysql://mysql2.sqlpub.com:3307/agileboot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&sslMode=REQUIRED + username: ENC(s4kjpEsplGGLeV3YRNvJpJhDSOAO0tEf) + password: ENC(hg/hxmducWsI8u83/eXgAi8yHBDFbB5z0xzwNtBejPc=) # 从库数据源 -# slave: -# url: jdbc:mysql://localhost:33067/agileboot2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 -# username: root -# password: 12345 + # slave: + # url: jdbc:mysql://localhost:33067/agileboot2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + # username: root + # password: 12345 # redis 配置 redis: - # 地址 - host: localhost - # 端口,默认为6379 - port: 36379 - # 数据库索引 - database: 0 - # 密码 - password: 12345 + host: redis + port: 6379 + database: 1 + password: ENC(s3HU866TUAjzrWStN7kpQQ==) # 连接超时时间 timeout: 10s lettuce: @@ -84,7 +80,7 @@ spring: logging: file: - path: D:/logs/agileboot-dev + path: ./logs/agileboot-dev springdoc: @@ -103,3 +99,6 @@ agileboot: # 前端url请求转发前缀 api-prefix: /dev-api demo-enabled: false +jasypt: + encryptor: + password: ${JASYPT_ENCRYPTOR_PASSWORD:} diff --git a/agileboot-admin/src/main/resources/application.yml b/agileboot-admin/src/main/resources/application.yml index d767094..b0be19b 100644 --- a/agileboot-admin/src/main/resources/application.yml +++ b/agileboot-admin/src/main/resources/application.yml @@ -1,7 +1,7 @@ # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 8080 + port: 18080 servlet: # 应用的访问路径 context-path: / diff --git a/agileboot-common/pom.xml b/agileboot-common/pom.xml index 0f18a23..08e9a20 100644 --- a/agileboot-common/pom.xml +++ b/agileboot-common/pom.xml @@ -177,6 +177,13 @@ dynamic-datasource-spring-boot-starter + + + com.github.ulisesbocchio + jasypt-spring-boot-starter + 2.1.1 + + io.swagger