From 54bf00a292a7ec8179c5b10cad9330860aa05364 Mon Sep 17 00:00:00 2001 From: DB <2502523450@qq.com> Date: Thu, 12 Oct 2023 15:10:19 +0800 Subject: [PATCH] =?UTF-8?q?Jambox=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cpop-Jambox/Cpop-Jambox-Web/pom.xml | 46 +++++++ .../jambox/web/CpopJamboxWebApplication.java | 20 +++ .../src/main/resources/application-dev.yml | 80 ++++++++++++ .../src/main/resources/application-prod.yml | 60 +++++++++ .../src/main/resources/application-test.yml | 81 ++++++++++++ .../src/main/resources/application.yml | 118 ++++++++++++++++++ .../resources/static/i18n/messages.properties | 0 .../static/i18n/messages_en_US.properties | 7 ++ .../static/i18n/messages_zh_CN.properties | 7 ++ .../web/CpopJamboxWebApplicationTests.java | 13 ++ .../src/main/resources/application-dev.yml | 4 +- .../static/i18n/messages_en_US.properties | 25 ---- .../static/i18n/messages_zh_CN.properties | 25 ---- pom.xml | 1 + 14 files changed, 435 insertions(+), 52 deletions(-) create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/pom.xml create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/src/main/java/com/cpop/jambox/web/CpopJamboxWebApplication.java create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-dev.yml create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-prod.yml create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-test.yml create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application.yml create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages.properties create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages_en_US.properties create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages_zh_CN.properties create mode 100644 Cpop-Jambox/Cpop-Jambox-Web/src/test/java/com/cpop/jambox/web/CpopJamboxWebApplicationTests.java diff --git a/Cpop-Jambox/Cpop-Jambox-Web/pom.xml b/Cpop-Jambox/Cpop-Jambox-Web/pom.xml new file mode 100644 index 0000000..c631f71 --- /dev/null +++ b/Cpop-Jambox/Cpop-Jambox-Web/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + com.cpop + Cpop-Union + 1.0.0 + ../../pom.xml + + Cpop-Jambox-Web + Cpop-Jambox-Web + 果酱盒子-Web + jar + + + + com.cpop + Cpop-Jambox + + + + com.mysql + mysql-connector-j + runtime + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + + + diff --git a/Cpop-Jambox/Cpop-Jambox-Web/src/main/java/com/cpop/jambox/web/CpopJamboxWebApplication.java b/Cpop-Jambox/Cpop-Jambox-Web/src/main/java/com/cpop/jambox/web/CpopJamboxWebApplication.java new file mode 100644 index 0000000..30ac1a7 --- /dev/null +++ b/Cpop-Jambox/Cpop-Jambox-Web/src/main/java/com/cpop/jambox/web/CpopJamboxWebApplication.java @@ -0,0 +1,20 @@ +package com.cpop.jambox.web; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableAsync; + +/** + * @author DB + */ +@SpringBootApplication(scanBasePackages = {"com.cpop.**"}) +@MapperScan("com.cpop.**.mapper") +@EnableAsync +public class CpopJamboxWebApplication { + + public static void main(String[] args) { + SpringApplication.run(CpopJamboxWebApplication.class, args); + } + +} diff --git a/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-dev.yml b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-dev.yml new file mode 100644 index 0000000..476dd55 --- /dev/null +++ b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-dev.yml @@ -0,0 +1,80 @@ +# 项目相关配置 +cpop: + # 文件路径 示例( Windows配置W:/WorkSpace/java/uploadPath,Linux配置 /home/baseFramework/uploadPath) + profile: E:/Cpop/uploadPath + jwt: + #白名单 + whiteList: /login,/getCaptcha,/profile/**,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources + gateway: + rsa-keypair: + # 公钥文件 + publicKeyFile: E:\Cpop\Cpop-Union\Cpop-Core\src\main\resources\static\keyPair\publicKey + # 公钥文件 + privateKeyFile: E:\Cpop\Cpop-Union\Cpop-Core\src\main\resources\static\keyPair\privateKey + +# DataSource Config +spring: + application: + name: Cpop-Jambox-Dev + datasource: + url: jdbc:mysql://localhost:3306/cpop-union?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: root + #redis配置 + redis: + #地址 + host: localhost + #端口 + port: 6379 + #数据库 + database: 0 + #密码 + password: + #连接超时 + timeout: 5000 + lettuce: + pool: + # + min-idle: 0 + # + max-idle: 8 + # + max-active: 8 + # + max-wait: -1ms + data: + mongodb: + host: localhost + port: 27017 + database: cpop-union + +server: + port: 9421 + servlet: + context-path: /Cpop-Jambox + +#Mybatis-Flex +mybatis-flex: + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +# springdoc-openapi项目配置 +knife4j: + enable: true + openapi: + title: PuPu-OAM开发API + description: PuPu-OAM开发API + email: + concat: DB + url: https://api.jamboxsys.com + version: 1.0.0 + license: Apache 2.0 + license-url: https://stackoverflow.com/ + terms-of-service-url: https://api.jamboxsys.com + group: + #jambox + jambox: + group-name: Jambox + api-rule: package + api-rule-resources: + - com.cpop.jambox \ No newline at end of file diff --git a/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-prod.yml b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-prod.yml new file mode 100644 index 0000000..c21ae0a --- /dev/null +++ b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-prod.yml @@ -0,0 +1,60 @@ +# 项目相关配置 +cpop: + # 文件路径 示例( Windows配置W:/WorkSpace/java/uploadPath,Linux配置 /home/baseFramework/uploadPath) + profile: /root/jambox-union/jambox-oam/uploadPath/upload + jwt: + #白名单 + whiteList: /login,/getCaptcha,/profile/** + #拦截 + gateway: + rsa-keypair: + # 公钥文件 + publicKeyFile: /root/jambox-union/jambox-oam/script/secretKey/publicKey + # 公钥文件 + privateKeyFile: /root/jambox-union/jambox-oam/script/secretKey/privateKey + +# DataSource Config +spring: + application: + name: Cpop-Jambox-Prod + datasource: + url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/cpop-union?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: Customer0401 + #redis配置 + redis: + #地址 + host: 106.52.49.102 + #端口 + port: 6333 + #数据库 + database: 5 + #密码 + password: Jambox.123* + #连接超时 + timeout: 5000 + lettuce: + pool: + # + min-idle: 0 + # + max-idle: 8 + # + max-active: 8 + # + max-wait: -1ms + data: + mongodb: + host: localhost + port: 27017 + database: rock-blade + +server: + port: 9421 + servlet: + context-path: /Cpop-Jambox + +#Mybatis-Flex +mybatis-flex: + configuration: + log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl \ No newline at end of file diff --git a/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-test.yml b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-test.yml new file mode 100644 index 0000000..b2b1ff2 --- /dev/null +++ b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application-test.yml @@ -0,0 +1,81 @@ +# 项目相关配置 +cpop: + # 文件路径 示例( Windows配置W:/WorkSpace/java/uploadPath,Linux配置 /home/baseFramework/uploadPath) + profile: /root/jambox-union/jambox-oam/uploadPath/upload + jwt: + #白名单 + whiteList: /login,/getCaptcha,/profile/**,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources + #拦截 + gateway: + rsa-keypair: + # 公钥文件 + publicKeyFile: /root/jambox-union/jambox-oam/script/secretKey/publicKey + # 公钥文件 + privateKeyFile: /root/jambox-union/jambox-oam/script/secretKey/privateKey + +# DataSource Config +spring: + application: + name: Cpop-Jambox-Test + datasource: + url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/cpop-union?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: Customer0401 + #redis配置 + redis: + #地址 + host: 106.52.49.102 + #端口 + port: 6333 + #数据库 + database: 5 + #密码 + password: Jambox.123* + #连接超时 + timeout: 5000 + lettuce: + pool: + # + min-idle: 0 + # + max-idle: 8 + # + max-active: 8 + # + max-wait: -1ms + data: + mongodb: + host: localhost + port: 27017 + database: rock-blade + +server: + port: 9421 + servlet: + context-path: /Cpop-Jambox + +#Mybatis-Flex +mybatis-flex: + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +# springdoc-openapi项目配置 +knife4j: + enable: true + openapi: + title: Cpop-Jambox开发API + description: Cpop-Jambox开发API + email: + concat: DB + url: https://api.jamboxsys.com + version: 1.0.0 + license: Apache 2.0 + license-url: https://stackoverflow.com/ + terms-of-service-url: https://api.jamboxsys.com + group: + #jambox + jambox: + group-name: Jambox + api-rule: package + api-rule-resources: + - com.cpop.jambox \ No newline at end of file diff --git a/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application.yml b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application.yml new file mode 100644 index 0000000..c0f7d4e --- /dev/null +++ b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/application.yml @@ -0,0 +1,118 @@ +# 项目相关配置 +cpop: + # 名称 + name: Cpop-Jambox + # 版本 + version: 1.0.0 + #JWT + jwt: + #密钥 + secret: abcdefghijklmnopqrstuvwxyz + #过期时间 + expire: 604800 + #token头 + header: Authorization + #拦截 + gateway: + rsa-keypair: + # 加密方式 + algorithm: RSA + # 初始化大小 + keySize: 2048 + +#Spring +spring: + mvc: + pathmatch: + matching-strategy: ant_path_matcher + servlet: + multipart: + #文件最大传输 + max-file-size: 1024MB + max-request-size: 300MB + profiles: + active: dev,jambox,api,sdk + datasource: + type: com.zaxxer.hikari.HikariDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + #hikari数据源特性配置 + hikari: + #最大连接数,默认值10. + maximum-pool-size: 10 + #最小空闲连接,默认值10. + minimum-idle: 10 + #连接超时时间(毫秒),默认值30秒. + connection-timeout: 30000 + #空闲连接超时时间,默认值600000(10分钟),只有空闲连接数大于最大连接数且空闲时间超过该值,才会被释放;如果大于等于 max-lifetime 且 max-lifetime>0,则会被重置为0. + idle-timeout: 600000 + #连接最大存活时间,默认值30分钟.设置应该比mysql设置的超时时间短 + max-lifetime: 3000000 + #连接测试查询 + connection-test-query: select 1 + messages: + #i18n + basename: static/i18n/messages + encoding: UTF-8 + cacheDuration: 3600 + quartz: + job-store-type: jdbc + jdbc: + initialize-schema: embedded + #定时任务启动开关,true-开 false-关 + auto-startup: true + #延迟1秒启动定时任务 + startup-delay: 1s + #启动时更新己存在的Job + overwrite-existing-jobs: true + properties: + org: + quartz: + scheduler: + instanceName: CpopJamboxScheduler + instanceId: AUTO + jobStore: + class: org.springframework.scheduling.quartz.LocalDataSourceJobStore + driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate + tablePrefix: QRTZ_ + isClustered: false + misfireThreshold: 12000 + clusterCheckinInterval: 15000 + threadPool: + class: org.quartz.simpl.SimpleThreadPool + threadCount: 1 + threadPriority: 5 + threadsInheritContextClassLoaderOfInitializingThread: true + +#Mybatis-Flex +mybatis-flex: + global-config: + key-config: + key-type: generator + value: snowFlakeId + # 逻辑删除数据存在标记值 默认值:0 + normal-value-of-logic-delete: 0 + # 逻辑删除数据删除标记值 默认值:0 + deleted-value-of-logic-delete: 1 + # 全局逻辑删除默认字段 + logic-delete-column: is_delete + +# 线程池配置参数 +task: + pool: + # 设置核心线程数 + corePoolSize: 10 + # 设置最大线程数 + maxPoolSize: 20 + # 设置空闲线程存活时间(秒 + keepAliveSeconds: 300 + # 设置队列容量 + queueCapacity: 100 + # 设置线程名称前缀 + threadNamePrefix: "Cpop-Jambox-AsyncNotify-" + # 设置线程池等待终止时间(秒) + awaitTerminationSeconds: 60 + +logging: + level: + #swagger日志 + springfox: error \ No newline at end of file diff --git a/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages.properties b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages.properties new file mode 100644 index 0000000..e69de29 diff --git a/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages_en_US.properties b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages_en_US.properties new file mode 100644 index 0000000..7cf16ed --- /dev/null +++ b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages_en_US.properties @@ -0,0 +1,7 @@ +#\u767B\u5F55\u4FE1\u606F +i18n_login_success=Login Success +i18n_loginOut_success=Login Out Success + +#\u7CFB\u7EDF\u57FA\u7840\u4FE1\u606F +i18n_baseInfo_success=Success +i18n_baseInfo_failed=Failed diff --git a/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages_zh_CN.properties b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages_zh_CN.properties new file mode 100644 index 0000000..d1fcca7 --- /dev/null +++ b/Cpop-Jambox/Cpop-Jambox-Web/src/main/resources/static/i18n/messages_zh_CN.properties @@ -0,0 +1,7 @@ +#\u767B\u5F55\u4FE1\u606F +i18n_login_success=\u767B\u5F55\u6210\u529F +i18n_loginOut_success=\u767B\u51FA\u6210\u529F + +#\u7CFB\u7EDF\u57FA\u7840\u4FE1\u606F +i18n_baseInfo_success=\u6210\u529F +i18n_baseInfo_failed=\u5931\u8D25 diff --git a/Cpop-Jambox/Cpop-Jambox-Web/src/test/java/com/cpop/jambox/web/CpopJamboxWebApplicationTests.java b/Cpop-Jambox/Cpop-Jambox-Web/src/test/java/com/cpop/jambox/web/CpopJamboxWebApplicationTests.java new file mode 100644 index 0000000..279c186 --- /dev/null +++ b/Cpop-Jambox/Cpop-Jambox-Web/src/test/java/com/cpop/jambox/web/CpopJamboxWebApplicationTests.java @@ -0,0 +1,13 @@ +package com.cpop.jambox.web; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class CpopJamboxWebApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml index 0c51045..925c510 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml @@ -77,10 +77,10 @@ knife4j: group-name: Oam api-rule: package api-rule-resources: - - com.pupu.oam + - com.cpop.oam #jambox jambox: group-name: Jambox api-rule: package api-rule-resources: - - com.pupu.jambox \ No newline at end of file + - com.cpop.jambox \ No newline at end of file diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/static/i18n/messages_en_US.properties b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/static/i18n/messages_en_US.properties index df35ab1..f09ef9c 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/static/i18n/messages_en_US.properties +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/static/i18n/messages_en_US.properties @@ -2,31 +2,6 @@ i18n_login_success=Login Success i18n_loginOut_success=Login Out Success -#\u544A\u8B66\u90AE\u4EF6i18n -i18n_alarm_email_dir=Dear -i18n_alarm_email_as_below=This is an alarm information from cloud platform: -i18n_alarm_email_content=Alarm content: -i18n_alarm_email_source=Alarm source: -i18n_alarm_email_level=Alarm level: -i18n_alarm_email_time=Alarm time: -i18n_alarm_email_level_alert=alert -i18n_alarm_email_level_info=info -i18n_alarm_email_level_warning=warning -i18n_alarm_email_level_error=error -i18n_alarm_email_tip=If the alarm level is warning or error, please resolve it as soon as possible! -i18n_alarm_email_not_reply=This email is automatically sent by system, please do not reply. -i18n_alarm_email_subject=System alert email - -#\u7CFB\u7EDF\u4FE1\u606F -i18n_sysInfo_no_version_Info=No version information retrieved! - -#\u7CFB\u7EDF\u65E5\u5FD7\u4FE1\u606F -i18n_sysLog_terminalLog=Terminal Log -i18n_sysLog_systemLog=System Log -i18n_sysLog_webLog=Web Log -i18n_sysLog_DBLog=DataBase Log -i18n_sysLog_pgPoolLog=PgPool Log - #\u64CD\u4F5C\u65E5\u5FD7\u4FE1\u606F i18n_operationLog_systemLogin=System User Login i18n_operationLog_systemLogout=System User Logout diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/static/i18n/messages_zh_CN.properties b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/static/i18n/messages_zh_CN.properties index ea41a20..9353e1e 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/static/i18n/messages_zh_CN.properties +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/static/i18n/messages_zh_CN.properties @@ -2,31 +2,6 @@ i18n_login_success=\u767B\u5F55\u6210\u529F i18n_loginOut_success=\u767B\u51FA\u6210\u529F -#\u544A\u8B66\u90AE\u4EF6i18n -i18n_alarm_email_dir=\u4EB2\u7231\u7684 -i18n_alarm_email_as_below=\u4EE5\u4E0B\u662F\u7CFB\u7EDF\u53D1\u9001\u7684\u544A\u8B66\u4FE1\u606F: -i18n_alarm_email_content=\u544A\u8B66\u5185\u5BB9: -i18n_alarm_email_source=\u544A\u8B66\u6765\u6E90: -i18n_alarm_email_level=\u544A\u8B66\u7EA7\u522B: -i18n_alarm_email_time=\u544A\u8B66\u65F6\u95F4: -i18n_alarm_email_level_alert=\u63D0\u793A -i18n_alarm_email_level_info=\u4FE1\u606F -i18n_alarm_email_level_warning=\u8B66\u544A -i18n_alarm_email_level_error=\u9519\u8BEF -i18n_alarm_email_tip=\u5982\u679C\u662F\u8B66\u544A\u6216\u9519\u8BEF\u7EA7\u522B\u7684\u4FE1\u606F,\u8BF7\u5C3D\u5FEB\u5904\u7406,\u4EE5\u514D\u5F71\u54CD\u5DE5\u4F5C\u4E1A\u52A1\uFF01 -i18n_alarm_email_not_reply=\u672C\u90AE\u4EF6\u4E3A\u7CFB\u7EDF\u81EA\u52A8\u53D1\u9001\u7684\u90AE\u4EF6,\u8BF7\u52FF\u56DE\u590D\u3002 -i18n_alarm_email_subject=\u7CFB\u7EDF\u544A\u8B66\u90AE\u4EF6 - -#\u7CFB\u7EDF\u4FE1\u606F -i18n_sysInfo_no_version_Info=\u6CA1\u6709\u68C0\u7D22\u5230\u7248\u672C\u4FE1\u606F\uFF01 - -#\u7CFB\u7EDF\u65E5\u5FD7\u4FE1\u606F -i18n_sysLog_terminalLog=\u7EC8\u7AEF\u65E5\u5FD7 -i18n_sysLog_systemLog=\u7CFB\u7EDF\u65E5\u5FD7 -i18n_sysLog_webLog=web\u65E5\u5FD7 -i18n_sysLog_DBLog=\u6570\u636E\u5E93\u65E5\u5FD7 -i18n_sysLog_pgPoolLog=pgPool\u65E5\u5FD7 - #\u64CD\u4F5C\u65E5\u5FD7\u4FE1\u606F i18n_operationLog_systemLogin=\u7CFB\u7EDF\u7528\u6237\u767B\u5F55 i18n_operationLog_systemLogout=\u7CFB\u7EDF\u7528\u6237\u9000\u51FA diff --git a/pom.xml b/pom.xml index afc7841..a4f96ef 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,7 @@ Cpop-Oam Cpop-Oam/Cpop-Oam-Web Cpop-Jambox + Cpop-Jambox/Cpop-Jambox-Web