Skip to content

Commit

Permalink
Merge pull request #73 from mqttsnet/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
xiaonannet authored Aug 8, 2024
2 parents d8187b0 + f21427d commit 985c5b0
Show file tree
Hide file tree
Showing 67 changed files with 1,644 additions and 894 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ hs_err_pid*
/thinglinks-visual/*/target
*.iml
doc/
src/
/src/
26 changes: 0 additions & 26 deletions doc/nacos-config/DEFAULT_GROUP/rocketmq.yml

This file was deleted.

2 changes: 1 addition & 1 deletion doc/nacos-config/DEFAULT_GROUP/thinglinks-modules-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mybatis:
swagger:
title: 代码生成接口文档
license: Powered By thinglinks
licenseUrl: https://doc.thinglinks.mqttsnet.com
licenseUrl: http://www.mqttsnet.com/

# 代码生成
gen:
Expand Down
2 changes: 1 addition & 1 deletion doc/nacos-config/DEFAULT_GROUP/thinglinks-modules-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ mybatis:
swagger:
title: 定时任务接口文档
license: Powered By thinglinks
licenseUrl: https://doc.thinglinks.mqttsnet.com
licenseUrl: http://www.mqttsnet.com/
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ mybatis:
swagger:
title: 系统模块接口文档
license: Powered By thinglinks
licenseUrl: https://doc.thinglinks.mqttsnet.com
licenseUrl: http://www.mqttsnet.com/
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<thinglinks.version>1.2.0.RELEASE</thinglinks.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<java.version>17</java.version>
<spring-boot.version>2.7.7</spring-boot.version>
<spring-cloud.version>2021.0.5</spring-cloud.version>
<spring-cloud-alibaba.version>2021.0.4.0</spring-cloud-alibaba.version>
Expand Down Expand Up @@ -48,8 +48,8 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- 编译时的编码 -->
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<dockerfile-maven-plugin.version>1.4.12</dockerfile-maven-plugin.version>
<docker.image.prefix>mqttsnet</docker.image.prefix>

Expand Down
31 changes: 16 additions & 15 deletions src/main/filters/config-dev.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# \u5728\u8FD9\u4E2A\u914D\u7F6E\u6587\u4EF6\u4E2D\u914D\u7F6E\u7684\u5C5E\u6027\uFF0C\u662F\u6240\u6709\u670D\u52A1\u5747\u9700\u8981\u7684\u7EDF\u4E00\u7684\u914D\u7F6E\uFF0C\u4E14\u4E0D\u80FD\u914D\u7F6E\u5728nacos\u4E2D
# \u5FAE\u670D\u52A1\u5BA2\u6237\u7AEF\u9700\u8981 \u914D\u7F6E\u7684 nacos \u670D\u52A1\u7AEF\u7684ip\u7B49\u4FE1\u606F
nacos.ip=124.223.113.139
nacos.port=18848
# \u72EC\u7ACB\u547D\u540D\u7A7A\u95F4\u907F\u514D\u8DDF\u522B\u7684\u9879\u76EE\u51B2\u7A81
nacos.namespace=9507457f-fe75-43ad-a48a-40f6ffc60b8f
nacos.username=thinglinks-test
nacos.password=12345678
# 在这个配置文件中配置的属性,是所有服务均需要的统一的配置,且不能配置在nacos中
# 微服务客户端需要配置的nacos服务端的ip等信息
nacos.ip=127.0.0.1
nacos.port=8848
nacos.namespace=7b0a0646-fdeb-483f-b4c8-9024f8920be9
nacos.username=nacos
nacos.password=nacos
# 微服务注册到nacos的ip(确保微服务使用正确的 IP 地址进行注册)
nacos.discovery.ip=127.0.0.1

# seata \u5BA2\u6237\u7AEF\u4ECE nacos \u62C9\u53D6\u914D\u7F6E\u548C\u6CE8\u518C\u7684\u547D\u540D\u7A7A\u95F4 \u8DDF nacos.namespace \u533A\u5206\u51FA\u6765\uFF0C\u539F\u56E0\u662F seata
seata.namespace=23a01bfb-11c2-4a33-811f-8b57131a4d10
# seata \u7684 grouplist ip
# seata 客户端从 nacos 拉取配置和注册的命名空间 跟 nacos.namespace 区分开来,原因为 seata
seata.namespace=f65008d9-37f1-45ce-88eb-fba641041065
# seata grouplist ip
seata.ip=127.0.0.1
# seata \u7684 grouplist \u7AEF\u53E3
# seata grouplist 端口
seata.port=8091
# \u65E5\u5FD7\u5B58\u50A8\u8DEF\u5F84
logging.file.path=/usr/local/mqtts/logs
# sentinel \u63A7\u5236\u53F0
# 日志存储路径
logging.file.path=/data01/mqttsnet/data_dev/logs
# sentinel 控制台的地址
sentinel.dashboard=127.0.0.1:8088
25 changes: 13 additions & 12 deletions src/main/filters/config-prod.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# \u5728\u8FD9\u4E2A\u914D\u7F6E\u6587\u4EF6\u4E2D\u914D\u7F6E\u7684\u5C5E\u6027\uFF0C\u662F\u6240\u6709\u670D\u52A1\u5747\u9700\u8981\u7684\u7EDF\u4E00\u7684\u914D\u7F6E\uFF0C\u4E14\u4E0D\u80FD\u914D\u7F6E\u5728nacos\u4E2D
# \u5FAE\u670D\u52A1\u5BA2\u6237\u7AEF\u9700\u8981 \u914D\u7F6E\u7684 nacos \u670D\u52A1\u7AEF\u7684ip\u7B49\u4FE1\u606F
# 在这个配置文件中配置的属性,是所有服务均需要的统一的配置,且不能配置在nacos中
# 微服务客户端需要配置的nacos服务端的ip等信息
nacos.ip=127.0.0.1
nacos.port=8848
# \u72EC\u7ACB\u547D\u540D\u7A7A\u95F4\u907F\u514D\u8DDF\u522B\u7684\u9879\u76EE\u51B2\u7A81
nacos.namespace=23a01bfb-11c2-4a33-811f-8b57131a4d10
nacos.namespace=7b0a0646-fdeb-483f-b4c8-9024f8920be9
nacos.username=nacos
nacos.password=123456
nacos.password=nacos
# 微服务注册到nacos的ip(确保微服务使用正确的 IP 地址进行注册)
nacos.discovery.ip=127.0.0.1

# seata \u5BA2\u6237\u7AEF\u4ECE nacos \u62C9\u53D6\u914D\u7F6E\u548C\u6CE8\u518C\u7684\u547D\u540D\u7A7A\u95F4 \u8DDF nacos.namespace \u533A\u5206\u51FA\u6765\uFF0C\u539F\u56E0\u662F seata
seata.namespace=23a01bfb-11c2-4a33-811f-8b57131a4d10
# seata \u7684 grouplist ip
# seata 客户端从 nacos 拉取配置和注册的命名空间 跟 nacos.namespace 区分开来,原因为 seata
seata.namespace=f65008d9-37f1-45ce-88eb-fba641041065
# seata grouplist ip
seata.ip=127.0.0.1
# seata \u7684 grouplist \u7AEF\u53E3
# seata grouplist 端口
seata.port=8091
# \u65E5\u5FD7\u5B58\u50A8\u8DEF\u5F84
logging.file.path=/usr/local/mqtts/logs
# sentinel \u63A7\u5236\u53F0
# 日志存储路径
logging.file.path=/data01/mqttsnet/data_prod/logs
# sentinel 控制台的地址
sentinel.dashboard=127.0.0.1:8088
20 changes: 20 additions & 0 deletions src/main/filters/config-release.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 在这个配置文件中配置的属性,是所有服务均需要的统一的配置,且不能配置在nacos中
# 微服务客户端需要配置的nacos服务端的ip等信息
nacos.ip=127.0.0.1
nacos.port=8848
nacos.namespace=7b0a0646-fdeb-483f-b4c8-9024f8920be9
nacos.username=nacos
nacos.password=nacos
# 微服务注册到nacos的ip(确保微服务使用正确的 IP 地址进行注册)
nacos.discovery.ip=127.0.0.1

# seata 客户端从 nacos 拉取配置和注册的命名空间 跟 nacos.namespace 区分开来,原因为 seata
seata.namespace=f65008d9-37f1-45ce-88eb-fba641041065
# seata 的 grouplist ip
seata.ip=127.0.0.1
# seata 的 grouplist 端口
seata.port=8091
# 日志存储路径
logging.file.path=/data01/mqttsnet/data_release/logs
# sentinel 控制台的地址
sentinel.dashboard=127.0.0.1:8088
20 changes: 20 additions & 0 deletions src/main/filters/config-test.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 在这个配置文件中配置的属性,是所有服务均需要的统一的配置,且不能配置在nacos中
# 微服务客户端需要配置的nacos服务端的ip等信息
nacos.ip=127.0.0.1
nacos.port=8848
nacos.namespace=7b0a0646-fdeb-483f-b4c8-9024f8920be9
nacos.username=nacos
nacos.password=nacos
# 微服务注册到nacos的ip(确保微服务使用正确的 IP 地址进行注册)
nacos.discovery.ip=127.0.0.1

# seata 客户端从 nacos 拉取配置和注册的命名空间 跟 nacos.namespace 区分开来,原因为 seata
seata.namespace=f65008d9-37f1-45ce-88eb-fba641041065
# seata 的 grouplist ip
seata.ip=127.0.0.1
# seata 的 grouplist 端口
seata.port=8091
# 日志存储路径
logging.file.path=/data01/mqttsnet/data_test/logs
# sentinel 控制台的地址
sentinel.dashboard=127.0.0.1:8088
16 changes: 14 additions & 2 deletions thinglinks-auth/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 使用 Java 运行环境
FROM openjdk:8-jre
FROM registry.cn-hangzhou.aliyuncs.com/mqttsnet-community/openjdk:17-jdk

# 维护者信息
LABEL maintainer="mqttsnet [email protected]"
Expand All @@ -22,4 +22,16 @@ HEALTHCHECK --interval=30s --timeout=30s --retries=3 \
CMD curl -f http://localhost:19200/actuator/health || exit 1

# 启动 Java 应用
ENTRYPOINT ["java", "-Xmx512m", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/app.jar"]
ENTRYPOINT ["java", \
"--add-opens=java.base/java.lang=ALL-UNNAMED", \
"-Xms512m", "-Xmx1024m", \
"-XX:ReservedCodeCacheSize=256m", \
"-XX:InitialCodeCacheSize=256m", \
"-XX:+UnlockExperimentalVMOptions", \
"-XX:+UseZGC", \
"-XX:ConcGCThreads=1", "-XX:ParallelGCThreads=2", \
"-XX:ZCollectionInterval=30", "-XX:ZAllocationSpikeTolerance=5", \
"-XX:+UnlockDiagnosticVMOptions", "-XX:-ZProactive", \
"-Dfile.encoding=UTF-8", \
"-Djava.security.egd=file:/dev/./urandom", \
"-jar", "/app.jar"]
3 changes: 2 additions & 1 deletion thinglinks-auth/src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Spring
spring:
spring:
application:
# 应用名称
name: @project.artifactId@
Expand Down Expand Up @@ -35,3 +35,4 @@ spring:
refresh: true
username: @nacos.username@
password: @nacos.password@

36 changes: 12 additions & 24 deletions thinglinks-auth/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
<fileNamePattern>${log.path}/all.%d{yyyy-MM-dd}.log</fileNamePattern>
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</layout>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>100MB</MaxFileSize>
Expand All @@ -42,11 +40,9 @@
<!-- 日志最大的历史 30天 -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</layout>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
Expand All @@ -66,11 +62,9 @@
<!-- 日志最大的历史 30天 -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</layout>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>WARN</level>
Expand All @@ -90,11 +84,9 @@
<!-- 日志最大的历史 30天 -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</layout>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
Expand All @@ -112,10 +104,6 @@

<root level="info">
<appender-ref ref="console"/>
</root>

<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info"/>
<appender-ref ref="file_warn"/>
<appender-ref ref="file_error"/>
Expand Down
1 change: 0 additions & 1 deletion thinglinks-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<module>thinglinks-common-security</module>
<module>thinglinks-common-datascope</module>
<module>thinglinks-common-datasource</module>
<module>thinglinks-common-rocketmq</module>
<module>thinglinks-common-job</module>
<module>thinglinks-common-kafka</module>
<module>thinglinks-common-seata</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static void runFinalization() {

@Deprecated
public static void runFinalizersOnExit(boolean value) {
System.runFinalizersOnExit(value);
System.gc();
}

public static void load(String filename) {
Expand Down
35 changes: 0 additions & 35 deletions thinglinks-common/thinglinks-common-rocketmq/pom.xml

This file was deleted.

This file was deleted.

Loading

0 comments on commit 985c5b0

Please sign in to comment.