diff --git a/containerization/bootstrap.properties b/containerization/bootstrap.properties new file mode 100644 index 00000000..550a0711 --- /dev/null +++ b/containerization/bootstrap.properties @@ -0,0 +1,17 @@ +nacos.namespace=cskefu +nacos.server-addr=nacos:8848 + +spring.cloud.nacos.discovery.server-addr=${nacos.server-addr} +spring.cloud.nacos.discovery.namespace=${nacos.namespace} +spring.cloud.nacos.discovery.group=${nacos.namespace}-default + +spring.cloud.nacos.config.server-addr=${nacos.server-addr} +spring.cloud.nacos.config.file-extension=json +spring.cloud.nacos.config.namespace=${nacos.namespace} +spring.cloud.nacos.config.group=${nacos.namespace}-default + +spring.cloud.nacos.config.extension-configs[0].group=${nacos.namespace}-default +spring.cloud.nacos.config.extension-configs[0].data_id=common +spring.cloud.nacos.config.extension-configs[0].refresh=true + +spring.config.import=optional:nacos:${spring.cloud.nacos.config.extension-configs[0].data_id}.${spring.cloud.nacos.config.file-extension},optional:nacos:${spring.application.name}.${spring.cloud.nacos.config.file-extension} diff --git a/containerization/docker-compose.yml b/containerization/docker-compose.yml index dacb9144..a541f846 100644 --- a/containerization/docker-compose.yml +++ b/containerization/docker-compose.yml @@ -47,13 +47,13 @@ services: - mysql sentinel-dashboard: - image: cskefu/sentinel-dashboard + image: cskefu/sentinel-dashboard:1.8.6 container_name: sentinel-dashboard restart: always hostname: sentinel-dashboard ports: - "${SENTINEL_DASHBOARD_PORT:-9850}:9850" - - "${SENTINEL_TRANSPORT_PORT:-9850}:9851" + - "${SENTINEL_TRANSPORT_PORT:-9851}:9851" expose: - 9850 - 9851 @@ -121,11 +121,13 @@ services: - 8080 volumes: - ./cskefu/logs:/cskefu/logs + - ./bootstrap.properties:/app/resources/bootstrap.properties deploy: replicas: 3 environment: - "JAVA_OPTS=-Xmx${CSKEFU_JAVA_XMX:-512m} -Xms${CSKEFU_JAVA_XMS:-512m} -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true --illegal-access=warn" - LOGGING_LEVEL_ROOT=${LOGGING_LEVEL_ROOT:-INFO} + - SPRING_APPLICATION_NAME=cskefu-web-gateway - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 - SPRING_DATASOURCE_USERNAME=root - SPRING_DATASOURCE_PASSWORD=${DB_PASSWD:-123456} @@ -149,9 +151,11 @@ services: - 8081 volumes: - ./cskefu/logs:/cskefu/logs + - ./bootstrap.properties:/app/resources/bootstrap.properties environment: - "JAVA_OPTS=-Xmx${CSKEFU_JAVA_XMX:-512m} -Xms${CSKEFU_JAVA_XMS:-512m} -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true --illegal-access=warn" - LOGGING_LEVEL_ROOT=${LOGGING_LEVEL_ROOT:-INFO} + - SPRING_APPLICATION_NAME=cskefu-manager-service - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 - SPRING_DATASOURCE_USERNAME=root - SPRING_DATASOURCE_PASSWORD=${DB_PASSWD:-123456} @@ -177,9 +181,11 @@ services: - 8082 volumes: - ./cskefu/logs:/cskefu/logs + - ./bootstrap.properties:/app/resources/bootstrap.properties environment: - "JAVA_OPTS=-Xmx${CSKEFU_JAVA_XMX:-512m} -Xms${CSKEFU_JAVA_XMS:-512m} -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true --illegal-access=warn" - LOGGING_LEVEL_ROOT=${LOGGING_LEVEL_ROOT:-INFO} + - SPRING_APPLICATION_NAME=cskefu-auth-service - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 - SPRING_DATASOURCE_USERNAME=root - SPRING_DATASOURCE_PASSWORD=${DB_PASSWD:-123456} @@ -205,9 +211,11 @@ services: - 8083 volumes: - ./cskefu/logs:/cskefu/logs + - ./bootstrap.properties:/app/resources/bootstrap.properties environment: - "JAVA_OPTS=-Xmx${CSKEFU_JAVA_XMX:-512m} -Xms${CSKEFU_JAVA_XMS:-512m} -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true --illegal-access=warn" - LOGGING_LEVEL_ROOT=${LOGGING_LEVEL_ROOT:-INFO} + - SPRING_APPLICATION_NAME=cskefu-plugin-service - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 - SPRING_DATASOURCE_USERNAME=root - SPRING_DATASOURCE_PASSWORD=${DB_PASSWD:-123456} @@ -233,9 +241,11 @@ services: - 8084 volumes: - ./cskefu/logs:/cskefu/logs + - ./bootstrap.properties:/app/resources/bootstrap.properties environment: - "JAVA_OPTS=-Xmx${CSKEFU_JAVA_XMX:-512m} -Xms${CSKEFU_JAVA_XMS:-512m} -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true --illegal-access=warn" - LOGGING_LEVEL_ROOT=${LOGGING_LEVEL_ROOT:-INFO} + - SPRING_APPLICATION_NAME=cskefu-channel-wechat-service - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 - SPRING_DATASOURCE_USERNAME=root - SPRING_DATASOURCE_PASSWORD=${DB_PASSWD:-123456} @@ -258,11 +268,13 @@ services: - ${CSKEFU_WEBSOCKET_SERVICE_PORT:-10000} volumes: - ./cskefu/logs:/cskefu/logs + - ./bootstrap.properties:/app/resources/bootstrap.properties deploy: replicas: 2 environment: - "JAVA_OPTS=-Xmx${CSKEFU_JAVA_XMX:-512m} -Xms${CSKEFU_JAVA_XMS:-512m} -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true --illegal-access=warn" - LOGGING_LEVEL_ROOT=${LOGGING_LEVEL_ROOT:-INFO} + - SPRING_APPLICATION_NAME=cskefu-websocket-service - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 - SPRING_DATASOURCE_USERNAME=root - SPRING_DATASOURCE_PASSWORD=${DB_PASSWD:-123456} diff --git a/containerization/mysql/nacos.sql b/containerization/mysql/nacos.sql index 29223b08..ae251369 100644 --- a/containerization/mysql/nacos.sql +++ b/containerization/mysql/nacos.sql @@ -206,3 +206,136 @@ CREATE TABLE `permissions` ( INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE); INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN'); + +INSERT INTO tenant_info (id, kp, tenant_id, tenant_name, tenant_desc, create_source, gmt_create, gmt_modified) VALUES (1, '1', 'cskefu', 'cskefu', '春松客服', 'nacos', 1697443534513, 1697443534513); + + +INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, gmt_create, gmt_modified, src_user, src_ip, op_type, tenant_id, encrypted_data_key) VALUES (1, 1, 'common.json', 'cskefu-default', '', '{ + "spring": { + "cloud": { + "nacos": { + "discovery": { + "server-addr": "localhost:8848" + } + } + }, + "datasource": { + "driver-class-name": "com.mysql.cj.jdbc.Driver", + "password": 123456, + "url": "jdbc:mysql://localhost:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8", + "username": "root" + }, + "mvc": { + "static-path-pattern": "/smart-doc/**" + }, + "rabbitmq": { + "addresses": "127.0.0.1", + "listener": { + "simple": { + "acknowledge-mode": "manual", + "prefetch": 1 + } + }, + "password": "guest", + "port": 5672, + "publisher-confirm-type": "correlated", + "publisher-returns": true, + "username": "guest" + }, + "web": { + "resources": { + "static-locations": "classpath:/smart-doc" + } + } + }, + "cskefu": { + "private-key": "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8TSxdMp76dZS2L8DpvJOgHNJmeI8PM30CFSeVMCHV5dEjtixipsMsSQu0ariAtVfA5M/ma1wcqEpsDO9nVQRsmsJCKMIWOcR6yBQU9f0T7Hkmil4Ckf61C1R7wLrynOjCeUCneQ7R0+dg9K25CymclPnK4ym2GInmuUjdbyQQcX4QBuIbmuY10MG8nW9ovhFML85KoBk5yxV4zVwLGP4TFJVnBmiNO3XSKL2XsX7wFFO93O8jmAnzgpWj8khsZAYG4nijIz2BciS9uQFa/lUX6yD50ykjNklbhCBIMGaQ6rr1WjnwLHDZU9sLvcYMboKPJHWz1FttvxuKSLYbf7j/AgMBAAECggEAEH1rPSrwF47kdW/vibu+uDuat7Tz3w9RpM6lc/Mn6ctoA6PLqN5hvFpJPbhHoAqn1kSZ0EJNA4imIjNsluf8rMyAs1QbN+CnMpMC7zL7jrS1IO+ze+LwVnpyufbbm3nfCE85OKSC7IbAfhHvUYOHIvQI5Zn76FTamFHxh5klpCrY1h8gcVWdRxiK0Q8AQP7KD0QnkzgROhkRmdI01639VyTCTc6Rtv5puU6J6idJwTd3JAiJXZ2qcoAwhnkSHnVnP5ktFxl66eHGJKeol6bGcJIFQRGLVmh78x6MXoqkJ2M7DRntL38TLKT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tQtUe8C68pzownlAp3kO0dPnYPStuQspnJT5yuMpthiJ5rlI3W8kEHF+EAbiG5rmNdDBvJ1vaL4RTC/OSqAZOcsVeM1cCxj+ExSVZwZojTt10ii9l7F+8BRTvdzvI5gJ84KVo/JIbGQGBuJ4oyM9gXIkvbkBWv5VF+sg+dMpIzZJW4QgSDBmkOq69Vo58Cxw2VPbC73GDG6CjyR1s9Rbbb8biki2G3+4/wIDAQAB", + "token": { + "duration": 3600 + } + } +}', '071dd46c6f4ae097aefdd566b0ec47d2', '2023-10-16 08:37:00', '2023-10-16 08:37:01', 'nacos', '172.20.0.1', 'I', 'cskefu', ''); +INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, gmt_create, gmt_modified, src_user, src_ip, op_type, tenant_id, encrypted_data_key) VALUES (0, 2, 'cskefu-auth-service.json', 'cskefu-default', '', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:31', '2023-10-16 08:39:32', null, '172.20.0.1', 'I', 'cskefu', ''); +INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, gmt_create, gmt_modified, src_user, src_ip, op_type, tenant_id, encrypted_data_key) VALUES (0, 3, 'cskefu-channel-wechat-service.json', 'cskefu-default', '', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:43', '2023-10-16 08:39:44', null, '172.20.0.1', 'I', 'cskefu', ''); +INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, gmt_create, gmt_modified, src_user, src_ip, op_type, tenant_id, encrypted_data_key) VALUES (0, 4, 'cskefu-web-gateway.json', 'cskefu-default', '', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:57', '2023-10-16 08:39:58', null, '172.20.0.1', 'I', 'cskefu', ''); +INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, gmt_create, gmt_modified, src_user, src_ip, op_type, tenant_id, encrypted_data_key) VALUES (0, 5, 'cskefu-manager-service.json', 'cskefu-default', '', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:40:12', '2023-10-16 08:40:13', null, '172.20.0.1', 'I', 'cskefu', ''); +INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, gmt_create, gmt_modified, src_user, src_ip, op_type, tenant_id, encrypted_data_key) VALUES (0, 6, 'cskefu-plugin-service.json', 'cskefu-default', '', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:40:27', '2023-10-16 08:40:28', null, '172.20.0.1', 'I', 'cskefu', ''); +INSERT INTO his_config_info (id, nid, data_id, group_id, app_name, content, md5, gmt_create, gmt_modified, src_user, src_ip, op_type, tenant_id, encrypted_data_key) VALUES (0, 7, 'cskefu-websocket-service.json', 'cskefu-default', '', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:40:57', '2023-10-16 08:40:57', null, '172.20.0.1', 'I', 'cskefu', ''); + +INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) VALUES (1, 'common.json', 'cskefu-default', '{ + "spring": { + "cloud": { + "nacos": { + "discovery": { + "server-addr": "localhost:8848" + } + } + }, + "datasource": { + "driver-class-name": "com.mysql.cj.jdbc.Driver", + "password": 123456, + "url": "jdbc:mysql://localhost:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8", + "username": "root" + }, + "mvc": { + "static-path-pattern": "/smart-doc/**" + }, + "rabbitmq": { + "addresses": "127.0.0.1", + "listener": { + "simple": { + "acknowledge-mode": "manual", + "prefetch": 1 + } + }, + "password": "guest", + "port": 5672, + "publisher-confirm-type": "correlated", + "publisher-returns": true, + "username": "guest" + }, + "web": { + "resources": { + "static-locations": "classpath:/smart-doc" + } + } + }, + "cskefu": { + "private-key": "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAg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64caNsTI0t0ZZs2TxNcqNcgUj/vWKmkJYdJf2cPQkUG2Eynug8TZgMGf6iAp6Sd5tjGEKWkfSyZcoJ95QUBUDZsIA60qfak+xOWn9LR9lJmElazirUWAzDMeH2nUWFUYumLIbkRSA1nLOfFhRvGBnRxAoGBAJvDAAjCzGBTpt77QZA0SFOzPVc6J7TmICk9lp5fpzYv3AlaBbhJrKAjDbybccWZLfxkCGjAWwG8UNXKBFzStjWt+LGQc4jJAXd0aCKrUBtnR7BX1epvaBUqwRgo7BK8WGdThI0RssE2gh4XXAhSGysq/XB0inRMf/z9K/+iHECxAoGAFlcIZ4/xXhbObUPU05hZFoj+zN5obaOLefRJn4uqjD9/VSRnI2bBv7vXKoLX6BwFF/PWvg1hzGy3O9TQ4XYPOqNGcBFDOqwxmVVevzXgRInoiRNP3xZXcqswppEbqORGbRoPLQBqLnPx1GKwbo7Fp9O5ywARVZtf4STt3pRK8PY=", + "public-key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvE0sXTKe+nWUti/A6byToBzSZniPDzN9AhUnlTAh1eXRI7YsYqbDLEkLtGq4gLVXwOTP5mtcHKhKbAzvZ1UEbJrCQijCFjnEesgUFPX9E+x5JopeApH+tQtUe8C68pzownlAp3kO0dPnYPStuQspnJT5yuMpthiJ5rlI3W8kEHF+EAbiG5rmNdDBvJ1vaL4RTC/OSqAZOcsVeM1cCxj+ExSVZwZojTt10ii9l7F+8BRTvdzvI5gJ84KVo/JIbGQGBuJ4oyM9gXIkvbkBWv5VF+sg+dMpIzZJW4QgSDBmkOq69Vo58Cxw2VPbC73GDG6CjyR1s9Rbbb8biki2G3+4/wIDAQAB", + "token": { + "duration": 3600 + } + } +}', '071dd46c6f4ae097aefdd566b0ec47d2', '2023-10-16 08:09:40', '2023-10-16 08:37:01', 'nacos', '172.20.0.1', '', 'cskefu', '', '', '', 'json', '', ''); +INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) VALUES (6, 'cskefu-auth-service.json', 'cskefu-default', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:32', '2023-10-16 08:39:32', null, '172.20.0.1', '', 'cskefu', null, null, null, 'json', null, ''); +INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) VALUES (7, 'cskefu-channel-wechat-service.json', 'cskefu-default', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:44', '2023-10-16 08:39:44', null, '172.20.0.1', '', 'cskefu', null, null, null, 'json', null, ''); +INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) VALUES (8, 'cskefu-web-gateway.json', 'cskefu-default', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:39:58', '2023-10-16 08:39:58', null, '172.20.0.1', '', 'cskefu', null, null, null, 'json', null, ''); +INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) VALUES (9, 'cskefu-manager-service.json', 'cskefu-default', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:40:13', '2023-10-16 08:40:13', null, '172.20.0.1', '', 'cskefu', null, null, null, 'json', null, ''); +INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) VALUES (10, 'cskefu-plugin-service.json', 'cskefu-default', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:40:28', '2023-10-16 08:40:28', null, '172.20.0.1', '', 'cskefu', null, null, null, 'json', null, ''); +INSERT INTO config_info (id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) VALUES (11, 'cskefu-websocket-service.json', 'cskefu-default', '{ + +}', 'f309d0a46b7f7d41270b5684c31acd11', '2023-10-16 08:40:57', '2023-10-16 08:40:57', null, '172.20.0.1', '', 'cskefu', null, null, null, 'json', null, ''); diff --git a/containerization/openresty/conf.d/default.conf b/containerization/openresty/conf.d/default.conf index 945dafdd..9e9b82fa 100644 --- a/containerization/openresty/conf.d/default.conf +++ b/containerization/openresty/conf.d/default.conf @@ -162,6 +162,7 @@ http { location = /nacos { internal; + set $args "$args&namespaceId=cskefu&groupName=cskefu-default"; proxy_pass http://nacos:8848/nacos/v1/ns/instance/list; } } diff --git a/containerization/scripts/build.sh b/containerization/scripts/build.sh index c35ed86b..6f3bc8a9 100644 --- a/containerization/scripts/build.sh +++ b/containerization/scripts/build.sh @@ -9,9 +9,7 @@ docker build -f sentinel-dashboard-1.8.6 -t sentinel-dashboard:1.8.6 . docker tag sentinel-dashboard:1.8.6 cskefu/sentinel-dashboard:1.8.6 -docker tag sentinel-dashboard:1.8.6 cskefu/sentinel-dashboard:latest +# docker login -docker login - -docker push cskefu/sentinel-dashboard:1.8.6 docker push cskefu/openjdk-21:debian-stretch-slim +docker push cskefu/sentinel-dashboard:1.8.6 diff --git a/cskefu-backend/cskefu-auth/cskefu-auth-service/pom.xml b/cskefu-backend/cskefu-auth/cskefu-auth-service/pom.xml index 3a5d00e8..1fc77c7b 100644 --- a/cskefu-backend/cskefu-auth/cskefu-auth-service/pom.xml +++ b/cskefu-backend/cskefu-auth/cskefu-auth-service/pom.xml @@ -34,6 +34,14 @@ com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + org.springframework.cloud + spring-cloud-starter-bootstrap + mysql mysql-connector-java diff --git a/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/java/com/cskefu/CskefuAuthApplication.java b/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/java/com/cskefu/CskefuAuthApplication.java index 504b275d..b4ceff03 100644 --- a/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/java/com/cskefu/CskefuAuthApplication.java +++ b/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/java/com/cskefu/CskefuAuthApplication.java @@ -5,6 +5,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.context.annotation.Bean; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; @@ -16,6 +17,7 @@ import org.springframework.security.provisioning.InMemoryUserDetailsManager; @Slf4j @SpringBootApplication @EnableDiscoveryClient +@RefreshScope public class CskefuAuthApplication { public static void main(String[] args) { try { diff --git a/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/resources/application.properties b/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/resources/application.properties index ff4108bc..79cb1062 100644 --- a/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/resources/application.properties +++ b/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/resources/application.properties @@ -2,16 +2,16 @@ debug=true server.port=8082 spring.application.name=cskefu-auth-service +spring.mvc.static-path-pattern=/smart-doc/** +spring.web.resources.static-locations=classpath:/smart-doc + +spring.cloud.nacos.discovery.server-addr=localhost:8848 + spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 spring.datasource.username=root spring.datasource.password=123456 -spring.cloud.nacos.discovery.server-addr=localhost:8848 - -spring.mvc.static-path-pattern=/smart-doc/** -spring.web.resources.static-locations=classpath:/smart-doc - cskefu.private-key=MIIE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h3s2K6SLS7g3QKBgE41Bof6ArrIc39ubmEcF64caNsTI0t0ZZs2TxNcqNcgUj/vWKmkJYdJf2cPQkUG2Eynug8TZgMGf6iAp6Sd5tjGEKWkfSyZcoJ95QUBUDZsIA60qfak+xOWn9LR9lJmElazirUWAzDMeH2nUWFUYumLIbkRSA1nLOfFhRvGBnRxAoGBAJvDAAjCzGBTpt77QZA0SFOzPVc6J7TmICk9lp5fpzYv3AlaBbhJrKAjDbybccWZLfxkCGjAWwG8UNXKBFzStjWt+LGQc4jJAXd0aCKrUBtnR7BX1epvaBUqwRgo7BK8WGdThI0RssE2gh4XXAhSGysq/XB0inRMf/z9K/+iHECxAoGAFlcIZ4/xXhbObUPU05hZFoj+zN5obaOLefRJn4uqjD9/VSRnI2bBv7vXKoLX6BwFF/PWvg1hzGy3O9TQ4XYPOqNGcBFDOqwxmVVevzXgRInoiRNP3xZXcqswppEbqORGbRoPLQBqLnPx1GKwbo7Fp9O5ywARVZtf4STt3pRK8PY= cskefu.public-key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvE0sXTKe+nWUti/A6byToBzSZniPDzN9AhUnlTAh1eXRI7YsYqbDLEkLtGq4gLVXwOTP5mtcHKhKbAzvZ1UEbJrCQijCFjnEesgUFPX9E+x5JopeApH+tQtUe8C68pzownlAp3kO0dPnYPStuQspnJT5yuMpthiJ5rlI3W8kEHF+EAbiG5rmNdDBvJ1vaL4RTC/OSqAZOcsVeM1cCxj+ExSVZwZojTt10ii9l7F+8BRTvdzvI5gJ84KVo/JIbGQGBuJ4oyM9gXIkvbkBWv5VF+sg+dMpIzZJW4QgSDBmkOq69Vo58Cxw2VPbC73GDG6CjyR1s9Rbbb8biki2G3+4/wIDAQAB cskefu.token.duration=3600 diff --git a/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/resources/smart-doc.json b/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/resources/smart-doc.json index 102f7749..d31e9688 100644 --- a/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/resources/smart-doc.json +++ b/cskefu-backend/cskefu-auth/cskefu-auth-service/src/main/resources/smart-doc.json @@ -1,5 +1,5 @@ { - "serverUrl": "http://localhost:8083", + "serverUrl": "http://localhost:${server.port}", "pathPrefix": "", "allInOne": true, "outPath": "src/main/resources/smart-doc", diff --git a/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/pom.xml b/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/pom.xml index 5d80dd44..14bf037c 100644 --- a/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/pom.xml +++ b/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/pom.xml @@ -22,6 +22,14 @@ com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + org.springframework.cloud + spring-cloud-starter-bootstrap + org.springframework.boot spring-boot-starter-validation diff --git a/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/java/com/cskefu/CskefuWechatChannelApplication.java b/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/java/com/cskefu/CskefuWechatChannelApplication.java index afabf196..3c5dde5a 100644 --- a/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/java/com/cskefu/CskefuWechatChannelApplication.java +++ b/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/java/com/cskefu/CskefuWechatChannelApplication.java @@ -4,9 +4,11 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.context.config.annotation.RefreshScope; @SpringBootApplication @EnableDiscoveryClient +@RefreshScope public class CskefuWechatChannelApplication { public static void main(String[] args) { try { diff --git a/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/resources/application.properties b/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/resources/application.properties index 1b447584..8771281d 100644 --- a/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/resources/application.properties +++ b/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/resources/application.properties @@ -2,12 +2,12 @@ debug=true server.port=8084 spring.application.name=cskefu-channel-wechat-service +spring.mvc.static-path-pattern=/smart-doc/** +spring.web.resources.static-locations=classpath:/smart-doc + +spring.cloud.nacos.discovery.server-addr=localhost:8848 + spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 spring.datasource.username=root spring.datasource.password=123456 - -spring.cloud.nacos.discovery.server-addr=localhost:8848 - -spring.mvc.static-path-pattern=/smart-doc/** -spring.web.resources.static-locations=classpath:/smart-doc \ No newline at end of file diff --git a/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/resources/smart-doc.json b/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/resources/smart-doc.json index a6a43af1..1138920c 100644 --- a/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/resources/smart-doc.json +++ b/cskefu-backend/cskefu-channel/cskefu-channel-wechat-service/src/main/resources/smart-doc.json @@ -1,5 +1,5 @@ { - "serverUrl": "http://localhost:8090", + "serverUrl": "http://localhost:8084", "pathPrefix": "", "allInOne": true, "outPath": "src/main/resources/smart-doc", diff --git a/cskefu-backend/cskefu-gateway/cskefu-web-gateway/pom.xml b/cskefu-backend/cskefu-gateway/cskefu-web-gateway/pom.xml index e8eced01..a946dc5d 100644 --- a/cskefu-backend/cskefu-gateway/cskefu-web-gateway/pom.xml +++ b/cskefu-backend/cskefu-gateway/cskefu-web-gateway/pom.xml @@ -22,6 +22,14 @@ com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + org.springframework.cloud + spring-cloud-starter-bootstrap + com.alibaba.cloud spring-cloud-starter-alibaba-sentinel diff --git a/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/java/com/cskefu/CskefuWebGatewayApplication.java b/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/java/com/cskefu/CskefuWebGatewayApplication.java index 24e80318..b503a973 100644 --- a/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/java/com/cskefu/CskefuWebGatewayApplication.java +++ b/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/java/com/cskefu/CskefuWebGatewayApplication.java @@ -1,5 +1,6 @@ package com.cskefu; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @@ -13,7 +14,10 @@ import java.net.UnknownHostException; @SpringBootApplication @EnableDiscoveryClient @RestController +@RefreshScope public class CskefuWebGatewayApplication { + @Value("${xxx}") + private String xxx; public static void main(String[] args) { try { SpringApplication.run(CskefuWebGatewayApplication.class, args); @@ -25,6 +29,6 @@ public class CskefuWebGatewayApplication { @GetMapping({"", "/"}) public String index() throws UnknownHostException { InetAddress localHost = InetAddress.getLocalHost(); - return localHost.getHostAddress(); + return localHost.getHostAddress() + " " + xxx; } } diff --git a/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/resources/application.properties b/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/resources/application.properties index 6afaf7f1..ac6944b7 100644 --- a/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/resources/application.properties +++ b/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/resources/application.properties @@ -2,14 +2,15 @@ debug=true server.port=8080 spring.application.name=cskefu-web-gateway -spring.cloud.nacos.server-addr=localhost:8848 +spring.mvc.static-path-pattern=/smart-doc/** +spring.web.resources.static-locations=classpath:/smart-doc -# ???? -spring.cloud.nacos.discovery.server-addr=${spring.cloud.nacos.server-addr} +spring.cloud.nacos.discovery.server-addr=localhost:8848 # sentinel spring.cloud.sentinel.transport.dashboard=localhost:9850 spring.cloud.sentinel.transport.port=9851 -spring.mvc.static-path-pattern=/smart-doc/** -spring.web.resources.static-locations=classpath:/smart-doc +spring.cloud.nacos.config.import-check.enabled=false + +xxx=aaaaaaaaaa \ No newline at end of file diff --git a/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/resources/bootstrap.properties b/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/resources/bootstrap.properties new file mode 100644 index 00000000..eaeaea23 --- /dev/null +++ b/cskefu-backend/cskefu-gateway/cskefu-web-gateway/src/main/resources/bootstrap.properties @@ -0,0 +1,16 @@ +nacos.namespace=cskefu +nacos.server-addr=nacos:8848 + +spring.cloud.nacos.discovery.server-addr=${nacos.server-addr} +spring.cloud.nacos.discovery.namespace=${nacos.namespace} + +spring.cloud.nacos.config.server-addr=${nacos.server-addr} +spring.cloud.nacos.config.file-extension=json +spring.cloud.nacos.config.namespace=${nacos.namespace} +spring.cloud.nacos.config.group=${nacos.namespace}-default + +spring.cloud.nacos.config.extension-configs[0].group=${nacos.namespace}-default +spring.cloud.nacos.config.extension-configs[0].data_id=common +spring.cloud.nacos.config.extension-configs[0].refresh=true + +spring.config.import=optional:nacos:${spring.cloud.nacos.config.extension-configs[0].data_id}.${spring.cloud.nacos.config.file-extension},optional:nacos:@spring.application.name@.${spring.cloud.nacos.config.file-extension} diff --git a/cskefu-backend/cskefu-manager/cskefu-manager-service/pom.xml b/cskefu-backend/cskefu-manager/cskefu-manager-service/pom.xml index 4c9ca7a7..2d88503b 100644 --- a/cskefu-backend/cskefu-manager/cskefu-manager-service/pom.xml +++ b/cskefu-backend/cskefu-manager/cskefu-manager-service/pom.xml @@ -23,6 +23,14 @@ com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + org.springframework.cloud + spring-cloud-starter-bootstrap + org.springframework.boot spring-boot-starter-validation diff --git a/cskefu-backend/cskefu-manager/cskefu-manager-service/src/main/java/com/cskefu/CskefuManagerApplication.java b/cskefu-backend/cskefu-manager/cskefu-manager-service/src/main/java/com/cskefu/CskefuManagerApplication.java index 0e846cfa..99e8ee34 100644 --- a/cskefu-backend/cskefu-manager/cskefu-manager-service/src/main/java/com/cskefu/CskefuManagerApplication.java +++ b/cskefu-backend/cskefu-manager/cskefu-manager-service/src/main/java/com/cskefu/CskefuManagerApplication.java @@ -3,9 +3,11 @@ package com.cskefu; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.context.config.annotation.RefreshScope; @SpringBootApplication @EnableDiscoveryClient +@RefreshScope public class CskefuManagerApplication { public static void main(String[] args) { try { diff --git a/cskefu-backend/cskefu-manager/cskefu-manager-service/src/main/resources/application.properties b/cskefu-backend/cskefu-manager/cskefu-manager-service/src/main/resources/application.properties index f1754412..8848fcad 100644 --- a/cskefu-backend/cskefu-manager/cskefu-manager-service/src/main/resources/application.properties +++ b/cskefu-backend/cskefu-manager/cskefu-manager-service/src/main/resources/application.properties @@ -2,12 +2,12 @@ debug=true server.port=8081 spring.application.name=cskefu-manager-service +spring.mvc.static-path-pattern=/smart-doc/** +spring.web.resources.static-locations=classpath:/smart-doc + +spring.cloud.nacos.discovery.server-addr=localhost:8848 + spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 spring.datasource.username=root spring.datasource.password=123456 - -spring.cloud.nacos.discovery.server-addr=localhost:8848 - -spring.mvc.static-path-pattern=/smart-doc/** -spring.web.resources.static-locations=classpath:/smart-doc \ No newline at end of file diff --git a/cskefu-backend/cskefu-plugin/cskefu-plugin-service/pom.xml b/cskefu-backend/cskefu-plugin/cskefu-plugin-service/pom.xml index 1f1626d6..c7535546 100644 --- a/cskefu-backend/cskefu-plugin/cskefu-plugin-service/pom.xml +++ b/cskefu-backend/cskefu-plugin/cskefu-plugin-service/pom.xml @@ -23,6 +23,14 @@ com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + org.springframework.cloud + spring-cloud-starter-bootstrap + org.springframework.boot spring-boot-starter-validation diff --git a/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/java/com/cskefu/CskefuPluginApplication.java b/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/java/com/cskefu/CskefuPluginApplication.java index b82e570c..693dff88 100644 --- a/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/java/com/cskefu/CskefuPluginApplication.java +++ b/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/java/com/cskefu/CskefuPluginApplication.java @@ -3,9 +3,11 @@ package com.cskefu; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.context.config.annotation.RefreshScope; @SpringBootApplication @EnableDiscoveryClient +@RefreshScope public class CskefuPluginApplication { public static void main(String[] args) { try { diff --git a/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/resources/application.properties b/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/resources/application.properties index 21ceead4..667a7e7a 100644 --- a/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/resources/application.properties +++ b/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/resources/application.properties @@ -2,12 +2,12 @@ debug=true server.port=8083 spring.application.name=cskefu-plugin-service +spring.mvc.static-path-pattern=/smart-doc/** +spring.web.resources.static-locations=classpath:/smart-doc + +spring.cloud.nacos.discovery.server-addr=localhost:8848 + spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/cskefu?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 spring.datasource.username=root spring.datasource.password=123456 - -spring.cloud.nacos.discovery.server-addr=localhost:8848 - -spring.mvc.static-path-pattern=/smart-doc/** -spring.web.resources.static-locations=classpath:/smart-doc \ No newline at end of file diff --git a/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/resources/smart-doc.json b/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/resources/smart-doc.json index a6a43af1..102f7749 100644 --- a/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/resources/smart-doc.json +++ b/cskefu-backend/cskefu-plugin/cskefu-plugin-service/src/main/resources/smart-doc.json @@ -1,5 +1,5 @@ { - "serverUrl": "http://localhost:8090", + "serverUrl": "http://localhost:8083", "pathPrefix": "", "allInOne": true, "outPath": "src/main/resources/smart-doc", diff --git a/cskefu-backend/cskefu-websocket/cskefu-websocket-service/pom.xml b/cskefu-backend/cskefu-websocket/cskefu-websocket-service/pom.xml index 23cfe5fe..d58cfbb0 100644 --- a/cskefu-backend/cskefu-websocket/cskefu-websocket-service/pom.xml +++ b/cskefu-backend/cskefu-websocket/cskefu-websocket-service/pom.xml @@ -26,6 +26,14 @@ com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + org.springframework.cloud + spring-cloud-starter-bootstrap + org.springframework.boot spring-boot-starter-amqp diff --git a/cskefu-backend/cskefu-websocket/cskefu-websocket-service/src/main/java/com/cskefu/WebsocketApplication.java b/cskefu-backend/cskefu-websocket/cskefu-websocket-service/src/main/java/com/cskefu/WebsocketApplication.java index 01190c43..51d87892 100644 --- a/cskefu-backend/cskefu-websocket/cskefu-websocket-service/src/main/java/com/cskefu/WebsocketApplication.java +++ b/cskefu-backend/cskefu-websocket/cskefu-websocket-service/src/main/java/com/cskefu/WebsocketApplication.java @@ -1,16 +1,17 @@ package com.cskefu; import com.cskefu.handler.WebSocketMappingHandlerMapping; -import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.context.annotation.Bean; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.reactive.socket.server.support.WebSocketHandlerAdapter; @SpringBootApplication @EnableDiscoveryClient +@RefreshScope public class WebsocketApplication { public static void main(String[] args) {