diff --git b/.gitignore a/.gitignore new file mode 100644 index 0000000..c84357e --- /dev/null +++ a/.gitignore @@ -0,0 +1,27 @@ +.idea +*.iml +/*/target/ +**/*.settings/ +**/.project +**/target/ +**/.classpath +**/logs/ +**/*.iml +**/.settings +**/*.class +**/*.pyc +**/target +**/.idea +**/*.log +.settings +.project +.classpath +*.class +*.pyc +target +**/.cache/ +*.log +/bin/ +/*-logs/ +**/banner.txt +**/.DS_Store \ No newline at end of file diff --git b/README.md a/README.md new file mode 100644 index 0000000..b1e1bfc --- /dev/null +++ a/README.md @@ -0,0 +1,12 @@ +# C端消息中心(fw-hestia) +### 简介 +C端消息中心 +### 对接文档 +### 1. SDK + ```xml + + cn.fw + fw-hestia-sdk + 1.0.0 + + ``` diff --git b/fw-hestia-common/pom.xml a/fw-hestia-common/pom.xml new file mode 100644 index 0000000..4c82c02 --- /dev/null +++ a/fw-hestia-common/pom.xml @@ -0,0 +1,29 @@ + + + + fw-hestia + cn.fw + 1.0.0 + ../pom.xml + + 4.0.0 + + fw-hestia-common + jar + fw-hestia-common + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + \ No newline at end of file diff --git b/fw-hestia-common/src/main/java/Demo.java a/fw-hestia-common/src/main/java/Demo.java new file mode 100644 index 0000000..a3ac47f --- /dev/null +++ a/fw-hestia-common/src/main/java/Demo.java @@ -0,0 +1,8 @@ +/** + * @author : kurisu + * @className : Demo + * @description : demo + * @date: 2021-09-23 14:29 + */ +public class Demo { +} diff --git b/fw-hestia-dao/pom.xml a/fw-hestia-dao/pom.xml new file mode 100644 index 0000000..4ac4577 --- /dev/null +++ a/fw-hestia-dao/pom.xml @@ -0,0 +1,49 @@ + + + + fw-hestia + cn.fw + 1.0.0 + ../pom.xml + + 4.0.0 + + fw-hestia-dao + jar + fw-hestia-dao + + + + com.baomidou + mybatis-plus-core + true + + + com.baomidou + mybatis-plus-extension + true + + + cn.fw + fw-hestia-domain + + + cn.fw + fw-hestia-common + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + \ No newline at end of file diff --git b/fw-hestia-dao/src/main/java/Demo.java a/fw-hestia-dao/src/main/java/Demo.java new file mode 100644 index 0000000..d4520ea --- /dev/null +++ a/fw-hestia-dao/src/main/java/Demo.java @@ -0,0 +1,8 @@ +/** + * @author : kurisu + * @className : Demo + * @description : demo + * @date: 2021-09-23 14:34 + */ +public class Demo { +} diff --git b/fw-hestia-domain/pom.xml a/fw-hestia-domain/pom.xml new file mode 100644 index 0000000..ebd9184 --- /dev/null +++ a/fw-hestia-domain/pom.xml @@ -0,0 +1,54 @@ + + + + fw-hestia + cn.fw + 1.0.0 + ../pom.xml + + 4.0.0 + + fw-hestia-domain + fw-hestia-domain + jar + + + + org.springframework.boot + spring-boot-starter-validation + + + cn.fw + fw-data-base + + + org.springframework + spring-web + true + + + org.projectlombok + lombok + provided + + + cn.fw + fw-common-data + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + \ No newline at end of file diff --git b/fw-hestia-domain/src/main/java/Demo.java a/fw-hestia-domain/src/main/java/Demo.java new file mode 100644 index 0000000..c51dc5f --- /dev/null +++ a/fw-hestia-domain/src/main/java/Demo.java @@ -0,0 +1,8 @@ +/** + * @author : kurisu + * @className : Demo + * @description : + * @date: 2021-09-23 14:45 + */ +public class Demo { +} diff --git b/fw-hestia-sdk/pom.xml a/fw-hestia-sdk/pom.xml new file mode 100644 index 0000000..8717802 --- /dev/null +++ a/fw-hestia-sdk/pom.xml @@ -0,0 +1,68 @@ + + + + fw-hestia + cn.fw + 1.0.0 + ../pom.xml + + 4.0.0 + + fw-hestia-sdk + jar + fw-hestia-sdk + 1.0.0 + + + 5.3.6.Final + + + + + org.springframework.cloud + spring-cloud-openfeign-core + true + + + javax.validation + validation-api + true + + + cn.fw + fw-data-base + true + + + org.hibernate + hibernate-validator + ${hibernate.validator} + provided + + + cn.fw + fw-common-data + + + + + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + attach-sources + + jar + + + + + + + + \ No newline at end of file diff --git b/fw-hestia-sdk/src/main/java/Demo.java a/fw-hestia-sdk/src/main/java/Demo.java new file mode 100644 index 0000000..2322119 --- /dev/null +++ a/fw-hestia-sdk/src/main/java/Demo.java @@ -0,0 +1,8 @@ +/** + * @author : kurisu + * @className : Demo + * @description : + * @date: 2021-09-23 14:59 + */ +public class Demo { +} diff --git b/fw-hestia-server/pom.xml a/fw-hestia-server/pom.xml new file mode 100644 index 0000000..3acddc8 --- /dev/null +++ a/fw-hestia-server/pom.xml @@ -0,0 +1,201 @@ + + + + fw-hestia + cn.fw + 1.0.0 + ../pom.xml + + 4.0.0 + + fw-hestia-server + jar + fw-hestia-server + C端消息中心server端 + + + + com.nepxion + discovery-plugin-starter-nacos + + + com.nepxion + discovery-plugin-config-center-starter-nacos + + + com.nepxion + discovery-plugin-strategy-starter-service + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-validation + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + com.zaxxer + HikariCP + compile + + + mysql + mysql-connector-java + + + + cn.fw + fw-pstn-service + + + + cn.fw + fw-auth-client + + + + cn.fw + fw-common-starter-web + + + cn.fw + fw-common-starter-mybatis + + + cn.fw + fw-common-starter-cache + + + org.springframework.boot + spring-boot-starter-test + test + + + junit + junit + + + + + org.junit.jupiter + junit-jupiter-engine + test + + + + io.micrometer + micrometer-registry-prometheus + + + cn.hutool + hutool-all + + + + + + fw-pstn-server + + + src/main/resources + true + + **/*.yml + **/*.properties + **/*.xml + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + true + true + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + + + local-dev + + dev,local + + + true + + + + local-test + + test,local + + + + dev + + dev + + + + test + + test + + + + gray + + gray + + + + prd + + prd + 7 + 1GB + 1GB + + + + \ No newline at end of file diff --git b/fw-hestia-server/src/main/java/Demo.java a/fw-hestia-server/src/main/java/Demo.java new file mode 100644 index 0000000..18eeb05 --- /dev/null +++ a/fw-hestia-server/src/main/java/Demo.java @@ -0,0 +1,8 @@ +/** + * @author : kurisu + * @className : Demo + * @description : + * @date: 2021-09-23 14:47 + */ +public class Demo { +} diff --git b/fw-hestia-server/src/main/resources/application-dev.yml a/fw-hestia-server/src/main/resources/application-dev.yml new file mode 100644 index 0000000..81eaeee --- /dev/null +++ a/fw-hestia-server/src/main/resources/application-dev.yml @@ -0,0 +1,21 @@ +server: + port: 8140 +spring: + cloud: + nacos: + discovery: + metadata: + group: discovery-dev-group + region: dev + version: 1.0 + namespace: df959b8c-de58-4d02-b9fb-d65ca3be05f3 +logging: + file: + max-history: 7 + max-size: 1GB + level: + cn: + fw: INFO +nacos: + plugin: + namespace: df959b8c-de58-4d02-b9fb-d65ca3be05f3 \ No newline at end of file diff --git b/fw-hestia-server/src/main/resources/application-gray.yml a/fw-hestia-server/src/main/resources/application-gray.yml new file mode 100644 index 0000000..8ed139c --- /dev/null +++ a/fw-hestia-server/src/main/resources/application-gray.yml @@ -0,0 +1,45 @@ +spring: + cloud: + nacos: + discovery: + metadata: + group: discovery-gray-group + region: gray + version: 1.0 + server-addr: 192.168.0.91:8848 + datasource: + url: jdbc:mysql://192.168.0.101:3306/fw_hestia?characterEncoding=UTF-8&useSSL=false + username: root + password: Feewee@root123 + redis: + host: 192.168.0.101 + url: + http-file-url: https://gate.feewee.cn/file + +fastdfs: + charset: UTF-8 + connectTimeout: 2 + group: cardfs + networkTimeout: 30 + port: 8080 + secretKey: FastDFS1234567890 + servers: 192.168.0.91:22122 + token: 'no' + +jedis: + pool: + host: 192.168.0.101 +logging: + file: + max-history: 7 + max-size: 1GB + level: + cn: + fw: INFO +nacos: + server-addr: 192.168.0.91:8848 +rocketmq: + name-server: 192.168.0.91:9876 + +task: + switch: 'on' \ No newline at end of file diff --git b/fw-hestia-server/src/main/resources/application-local.yml a/fw-hestia-server/src/main/resources/application-local.yml new file mode 100644 index 0000000..e463b9a --- /dev/null +++ a/fw-hestia-server/src/main/resources/application-local.yml @@ -0,0 +1,16 @@ +logging: + file: + max-history: 7 + max-size: 1GB + level: + cn: + fw: DEBUG +nacos: + plugin: + namespace: df959b8c-de58-4b02-b9fb-d65ca3be05f3 +spring: + application: + name: fw-hestia-local + +task: + switch: 'off' diff --git b/fw-hestia-server/src/main/resources/application-prd.yml a/fw-hestia-server/src/main/resources/application-prd.yml new file mode 100644 index 0000000..a4646a7 --- /dev/null +++ a/fw-hestia-server/src/main/resources/application-prd.yml @@ -0,0 +1,45 @@ +spring: + cloud: + nacos: + discovery: + metadata: + group: discovery-prd-group + region: prd + version: 1.0 + server-addr: 192.168.0.91:8848 + datasource: + url: jdbc:mysql://192.168.0.101:3306/fw_hestia?characterEncoding=UTF-8&useSSL=false + username: root + password: Feewee@root123 + redis: + host: 192.168.0.101 + url: + http-file-url: https://gate.feewee.cn/file + +fastdfs: + charset: UTF-8 + connectTimeout: 2 + group: cardfs + networkTimeout: 30 + port: 8080 + secretKey: FastDFS1234567890 + servers: 192.168.0.91:22122 + token: 'no' + +jedis: + pool: + host: 192.168.0.101 +logging: + file: + max-history: 15 + max-size: 1GB + level: + cn: + fw: INFO +nacos: + server-addr: 192.168.0.91:8848 +rocketmq: + name-server: 192.168.0.91:9876 + +task: + switch: 'on' diff --git b/fw-hestia-server/src/main/resources/application-test.yml a/fw-hestia-server/src/main/resources/application-test.yml new file mode 100644 index 0000000..ffdc330 --- /dev/null +++ a/fw-hestia-server/src/main/resources/application-test.yml @@ -0,0 +1,49 @@ +spring: + cloud: + nacos: + discovery: + metadata: + group: discovery-test-group + region: test + version: 1.0 + namespace: 0ba6d5d6-2a49-4086-b6c3-dbeec01c61a4 + datasource: + password: mysql@pwd123 + url: jdbc:mysql://192.168.0.9:3306/fw_hestia?characterEncoding=UTF-8&useSSL=false + username: test + redis: + host: 192.168.0.9 + url: + http-file-url: https://testgate.feewee.cn/file + +nacos: + plugin: + namespace: 0ba6d5d6-2a49-4086-b6b3-dbeec01c61a4 + +rocketmq: + name-server: 192.168.0.230:9876 + + +fastdfs: + charset: UTF-8 + connectTimeout: 2 + group: cardfs + networkTimeout: 30 + port: 8080 + secretKey: FastDFS1234567890 + servers: 192.168.0.230:22122 + token: 'no' + +jedis: + pool: + host: 192.168.0.9 +logging: + file: + max-history: 15 + max-size: 1GB + level: + cn: + fw: INFO + +task: + switch: 'on' diff --git b/fw-hestia-server/src/main/resources/application.yml a/fw-hestia-server/src/main/resources/application.yml new file mode 100644 index 0000000..0cb2a7e --- /dev/null +++ a/fw-hestia-server/src/main/resources/application.yml @@ -0,0 +1,122 @@ +spring: + application: + name: fw-hestia + attachment: + invoker-system: hestia + cache: + locker: + key-prefix: 'hestia:locker' + custom: + global-prefix: 'hestia' + + cloud: + nacos: + discovery: + server-addr: 192.168.0.230:8848 + datasource: + driver-class-name: com.mysql.jdbc.Driver + hikari: + connection-test-query: SELECT 1 FROM DUAL + password: mysql@pwd123 + url: jdbc:mysql://192.168.0.8:3306/fw_hestia?characterEncoding=UTF-8&useSSL=false + username: root + jackson: + default-property-inclusion: non_null + serialization: + write-dates-as-timestamps: true + time-zone: GMT+8 + main: + allow-bean-definition-overriding: true + profiles: + active: cache,${activatedProfiles} + redis: + host: 192.168.0.8 + lettuce: + pool: + max-active: 20 + max-wait: 1S + min-idle: 3 + port: 6379 + database: 3 + rest-result-processor: + enabled: false + servlet: + multipart: + enabled: true + max-file-size: 50MB + max-request-size: 100MB + +auth: + aes: + key: bN7DVjFMJPcoWDcR + ignore: + start-with: /user/*,/role/*,/user/login +fastdfs: + charset: UTF-8 + connectTimeout: 2 + group: pstndfs + networkTimeout: 30 + port: 8080 + secretKey: FastDFS1234567890 + servers: 192.168.0.230:22122 + token: 'no' + +hystrix: + command: + default: + circuitBreaker: + forceClosed: true + sleepWindowInMilliseconds: 100000 + execution: + isolation: + thread: + timeoutInMilliseconds: 3000 + shareSecurityContext: true +info: + build: + artifact: ${project.artifactId} + description: ${project.description} + groupId: ${project.groupId} + name: ${project.name} + version: ${project.version} +jedis: + pool: + config: + max-active: 30 + max-idle: 5 + max-wait-millis: 1000 + min-idle: 3 + test-on-borrow: false + test-on-return: false + test-while-idle: true + host: 192.168.0.8 + port: 6379 + db: 3 +mybatis-plus: + configuration: + cache-enabled: false + local-cache-scope: statement + log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl + map-underscore-to-camel-case: true + mapper-locations: classpath*:mapper/*.xml + type-aliases-package: cn.fw.data.base.db,cn.fw.common.attachment.domain + type-enums-package: cn.fw.hestia.domain.enums.**,cn.fw.hestia.sdk.enums.** + type-handlers-package: cn.fw.common.data.mybatis.handler +nacos: + server-addr: 192.168.0.230:8848 +ribbon: + ConnectTimeout: 30000 + MaxAutoRetries: 0 + MaxAutoRetriesNextServer: 0 + ReadTimeout: 120000 +rocketmq: + name-server: 192.168.0.234:9876 + producer: + group: ${spring.application.name} +server: + port: 8140 + undertow: + worker-threads: 50 + +task: + switch: 'on' \ No newline at end of file diff --git b/fw-hestia-server/src/main/resources/logback-spring.xml a/fw-hestia-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..0a3a322 --- /dev/null +++ a/fw-hestia-server/src/main/resources/logback-spring.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git b/fw-hestia-server/src/main/resources/logfile.xml a/fw-hestia-server/src/main/resources/logfile.xml new file mode 100644 index 0000000..e0b534c --- /dev/null +++ a/fw-hestia-server/src/main/resources/logfile.xml @@ -0,0 +1,62 @@ + + + + + + + + + ${dynamic.log.path}/${filePrefix}_all.log + + ${dynamic.log.path}/${filePrefix}_all.%d{yyyy-MM-dd}.%i.log + ${logMaxHistory} + ${logfileMaxSize} + ${logTotalSizeCap} + + + [%-5p] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] [%c] - %m%n + ${charSet} + + + + + + 0 + 500 + + + + + + + ERROR + + ${dynamic.log.path}/${filePrefix}_error.log + + ${dynamic.log.path}/${filePrefix}_error.%d{yyyy-MM-dd}.%i.log + ${logMaxHistory} + ${logfileMaxSize} + ${logTotalSizeCap} + + + [%-5p] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] [%c] - %m%n + ${charSet} + + + + + + 0 + 500 + + + + + + %highlight([%-1p]) %highlight(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %boldMagenta(%logger) %cyan(%msg%n) + ${charSet} + + + diff --git b/fw-hestia-service/pom.xml a/fw-hestia-service/pom.xml new file mode 100644 index 0000000..29c845b --- /dev/null +++ a/fw-hestia-service/pom.xml @@ -0,0 +1,109 @@ + + + + fw-hestia + cn.fw + 1.0.0 + + 4.0.0 + + fw-hestia-service + + + + org.springframework + spring-tx + true + + + org.springframework.data + spring-data-redis + true + + + org.springframework.boot + spring-boot-configuration-processor + true + + + org.springframework.retry + spring-retry + + + + cn.fw + fw-common-core + true + + + cn.fw + fw-dfs-sdk + + + cn.fw + fw-common-cache + true + + + cn.fw + fw-pstn-dao + + + org.slf4j + slf4j-api + + + ch.qos.logback + logback-core + + + cn.fw + fw-auth-client + + + cn.fw + fw-common-web + + + cn.fw + fw-pstn-sdk + + + org.apache.rocketmq + rocketmq-spring-boot-starter + + + io.netty + netty-all + + + + + cn.fw + redis-spring-boot-starter + + + org.redisson + redisson + + + com.google.zxing + javase + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + \ No newline at end of file diff --git b/fw-hestia-service/src/main/java/Demo.java a/fw-hestia-service/src/main/java/Demo.java new file mode 100644 index 0000000..2ecdf80 --- /dev/null +++ a/fw-hestia-service/src/main/java/Demo.java @@ -0,0 +1,8 @@ +/** + * @author : kurisu + * @className : Demo + * @description : + * @date: 2021-09-23 14:43 + */ +public class Demo { +} diff --git b/pom.xml a/pom.xml new file mode 100644 index 0000000..897d7f1 --- /dev/null +++ a/pom.xml @@ -0,0 +1,166 @@ + + + 4.0.0 + fw-hestia + 1.0.0 + pom + fw-hestia + 消息中心 + + + cn.fw + fw-common-dependencies + 3.2.0 + + + + fw-hestia-common + fw-hestia-service + fw-hestia-server + fw-hestia-dao + fw-hestia-domain + fw-hestia-sdk + + + + UTF-8 + 1.8 + 1.2.4.RELEASE + 5.1.47 + 3.3.1 + + 1.0.0 + 2.1.0 + 1.0 + 3.0.0 + 5.2.5 + + + + + + + mysql + mysql-connector-java + ${mysql-connector-java.version} + + + com.zaxxer + HikariCP + ${HikariCP.version} + + + + org.springframework.retry + spring-retry + ${spring-retry.version} + + + + cn.fw + fw-hestia-common + ${project.version} + + + cn.fw + fw-hestia-domain + ${project.version} + + + cn.fw + fw-hestia-dao + ${project.version} + + + cn.fw + fw-hestia-service + ${project.version} + + + + cn.fw + fw-auth-client + ${fw-auth-client.version} + + + cn.fw + fw-hestia-sdk + ${fw.hestia.sdk.version} + + + org.apache.rocketmq + rocketmq-spring-boot-starter + ${rocketmq-spring-boot-starter.version} + + + cn.fw + redis-spring-boot-starter + ${redis.spring.boot.starter} + + + com.google.zxing + javase + ${javase} + + + cn.hutool + hutool-all + ${hutool.all} + + + + + + + org.projectlombok + lombok + provided + + + junit + junit + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${java.version} + ${java.version} + + + + org.codehaus.mojo + versions-maven-plugin + + + + + + + feewee-maven-public + feewee maven public + http://nexus.feewee.cn/nexus/content/groups/public/ + + + + + + feewee-maven-releases + Nexus Release Repository + http://nexus.feewee.cn/nexus/content/repositories/releases/ + + + feewee-maven-snapshots + Nexus Snapshot Repository + http://nexus.feewee.cn/nexus/content/repositories/snapshots/ + true + + + \ No newline at end of file