From f9c924f9b6d9a59152d0021dcc2d4f53cdc499e6 Mon Sep 17 00:00:00 2001 From: yuanly Date: Fri, 20 May 2022 13:59:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?nacos=E8=BF=9E=E6=8E=A5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=8C=BA=E5=88=86=E5=BC=80=E5=8F=91=E3=80=81=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E3=80=81=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yml | 51 ++++++++++++++++++ .../src/main/resources/application-prod.yml | 51 ++++++++++++++++++ .../src/main/resources/application-test.yml | 51 ++++++++++++++++++ .../src/main/resources/application.yml | 52 +------------------ 4 files changed, 155 insertions(+), 50 deletions(-) create mode 100644 pigx-register/src/main/resources/application-dev.yml create mode 100644 pigx-register/src/main/resources/application-prod.yml create mode 100644 pigx-register/src/main/resources/application-test.yml diff --git a/pigx-register/src/main/resources/application-dev.yml b/pigx-register/src/main/resources/application-dev.yml new file mode 100644 index 000000000..75fa88493 --- /dev/null +++ b/pigx-register/src/main/resources/application-dev.yml @@ -0,0 +1,51 @@ +server: + port: 8848 + tomcat: + basedir: logs + +db: + num: 1 + user: ${MYSQL_USER:root} + password: ${MYSQL_PWD:root} + url: + 0: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + + +nacos: + core: + auth: + system.type: nacos + default.token.secret.key: SecretKey012345678901234567890123456789012345678901234567890123456789 + security: + ignore: + urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/** + +spring: + datasource: + platform: mysql #这个过期属性不能修改,nacos 代码对此有硬编码 + security: + enabled: true + boot: # 接入 spring boot admin + admin: + client: + url: http://pigx-monitor:5001 + username: pig + password: pig + instance: + prefer-ip: true + application: + name: @project.artifactId@ + +useAddressServer: true + +management: + endpoints: + web: + exposure: + include: '*' + metrics: + export: + influx: + enabled: false + elastic: + enabled: false diff --git a/pigx-register/src/main/resources/application-prod.yml b/pigx-register/src/main/resources/application-prod.yml new file mode 100644 index 000000000..75fa88493 --- /dev/null +++ b/pigx-register/src/main/resources/application-prod.yml @@ -0,0 +1,51 @@ +server: + port: 8848 + tomcat: + basedir: logs + +db: + num: 1 + user: ${MYSQL_USER:root} + password: ${MYSQL_PWD:root} + url: + 0: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + + +nacos: + core: + auth: + system.type: nacos + default.token.secret.key: SecretKey012345678901234567890123456789012345678901234567890123456789 + security: + ignore: + urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/** + +spring: + datasource: + platform: mysql #这个过期属性不能修改,nacos 代码对此有硬编码 + security: + enabled: true + boot: # 接入 spring boot admin + admin: + client: + url: http://pigx-monitor:5001 + username: pig + password: pig + instance: + prefer-ip: true + application: + name: @project.artifactId@ + +useAddressServer: true + +management: + endpoints: + web: + exposure: + include: '*' + metrics: + export: + influx: + enabled: false + elastic: + enabled: false diff --git a/pigx-register/src/main/resources/application-test.yml b/pigx-register/src/main/resources/application-test.yml new file mode 100644 index 000000000..75fa88493 --- /dev/null +++ b/pigx-register/src/main/resources/application-test.yml @@ -0,0 +1,51 @@ +server: + port: 8848 + tomcat: + basedir: logs + +db: + num: 1 + user: ${MYSQL_USER:root} + password: ${MYSQL_PWD:root} + url: + 0: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + + +nacos: + core: + auth: + system.type: nacos + default.token.secret.key: SecretKey012345678901234567890123456789012345678901234567890123456789 + security: + ignore: + urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/** + +spring: + datasource: + platform: mysql #这个过期属性不能修改,nacos 代码对此有硬编码 + security: + enabled: true + boot: # 接入 spring boot admin + admin: + client: + url: http://pigx-monitor:5001 + username: pig + password: pig + instance: + prefer-ip: true + application: + name: @project.artifactId@ + +useAddressServer: true + +management: + endpoints: + web: + exposure: + include: '*' + metrics: + export: + influx: + enabled: false + elastic: + enabled: false diff --git a/pigx-register/src/main/resources/application.yml b/pigx-register/src/main/resources/application.yml index 75fa88493..0750e5573 100644 --- a/pigx-register/src/main/resources/application.yml +++ b/pigx-register/src/main/resources/application.yml @@ -1,51 +1,3 @@ -server: - port: 8848 - tomcat: - basedir: logs - -db: - num: 1 - user: ${MYSQL_USER:root} - password: ${MYSQL_PWD:root} - url: - 0: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true - - -nacos: - core: - auth: - system.type: nacos - default.token.secret.key: SecretKey012345678901234567890123456789012345678901234567890123456789 - security: - ignore: - urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/** - spring: - datasource: - platform: mysql #这个过期属性不能修改,nacos 代码对此有硬编码 - security: - enabled: true - boot: # 接入 spring boot admin - admin: - client: - url: http://pigx-monitor:5001 - username: pig - password: pig - instance: - prefer-ip: true - application: - name: @project.artifactId@ - -useAddressServer: true - -management: - endpoints: - web: - exposure: - include: '*' - metrics: - export: - influx: - enabled: false - elastic: - enabled: false + profiles: + active: @profiles.active@ \ No newline at end of file From c28562847cac651343c553aaf956fa790794a385 Mon Sep 17 00:00:00 2001 From: yuanly Date: Sat, 28 May 2022 21:53:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1=E3=80=81=E6=9B=B4=E6=96=B0=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AFbug=E4=BF=AE=E5=A4=8D=EF=BC=9B=202=E3=80=81?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=97=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=BC=93=E5=AD=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/SysClientController.java | 1 + .../SysOauthClientDetailsServiceImpl.java | 53 +++++++++---------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysClientController.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysClientController.java index 5c2564ee5..ad504283a 100644 --- a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysClientController.java +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysClientController.java @@ -129,6 +129,7 @@ public class SysClientController { * 同步缓存字典 * @return R */ + @Inner(false) @SysLog("同步终端") @PutMapping("/sync") public R sync() { diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysOauthClientDetailsServiceImpl.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysOauthClientDetailsServiceImpl.java index fca40e2c3..1ed1f97e5 100644 --- a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysOauthClientDetailsServiceImpl.java +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysOauthClientDetailsServiceImpl.java @@ -79,6 +79,28 @@ public class SysOauthClientDetailsServiceImpl extends ServiceImpl