mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-16 10:25:07 +08:00
【fix】 优化使用 EventLoopGroup bossGroup = EventLoopGroupFactory.createBossGroup();
EventLoopGroup workerGroup = EventLoopGroupFactory.createWorkerGroup();
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
```shell
|
||||
mvn -Pnative -DskipTests clean package native:compile
|
||||
mvn -Pnative -DskipTests clean package native:compile
|
||||
```
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ docker run -d -it --privileged --name client -p 6004:6004 registry.cn-hangzhou.a
|
||||
```
|
||||
|
||||
```shell
|
||||
docker run -d -it --privileged --name client --restart=always -e spring.lazy.netty.client.inet-host=124.222.48.62 -e spring.lazy.netty.client.inet-port=30676 -e spring.lazy.netty.client.client-id="ziguang" registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.2.8-JDK17-NATIVE-SNAPSHOT
|
||||
docker run -d -it --privileged --name windows-client --restart=always -e spring.lazy.netty.client.inet-host=124.222.152.160 -e spring.lazy.netty.client.inet-port=30560 -e spring.lazy.netty.client.client-id="windows-11" registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.3.0-JDK17-SNAPSHOT
|
||||
```
|
||||
|
||||
```yaml
|
||||
|
@ -22,6 +22,11 @@
|
||||
<groupId>top.wu2020</groupId>
|
||||
<artifactId>wu-lazy-cloud-heartbeat-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.33</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@ -4,10 +4,10 @@ spring:
|
||||
client:
|
||||
# inet-host: 124.222.48.62
|
||||
# inet-port: 30676
|
||||
# inet-host: 124.222.48.62
|
||||
# inet-port: 30560
|
||||
inet-host: 127.0.0.1
|
||||
inet-port: 7001
|
||||
inet-host: 124.222.152.160
|
||||
inet-port: 30560
|
||||
# inet-host: 192.168.2.105
|
||||
# inet-port: 7001
|
||||
inet-path: wu-lazy-cloud-heartbeat-server
|
||||
client-id: wujiawei # 客户端ID
|
||||
app-key: key
|
||||
@ -18,6 +18,8 @@ spring:
|
||||
# # inet-path: wu-lazy-cloud-heartbeat-server
|
||||
# client-id: shuhan # 客户端ID
|
||||
# client-id: temp_id # 客户端ID
|
||||
---
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
host: 192.168.17.221
|
||||
@ -25,8 +27,17 @@ spring:
|
||||
password: wujiawei
|
||||
database: 2
|
||||
|
||||
---
|
||||
#spring:
|
||||
# datasource:
|
||||
# url: jdbc:h2:~/client_heartbeat;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE;DATABASE_TO_UPPER=true;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
|
||||
# username: sa
|
||||
# driver-class-name: org.h2.Driver
|
||||
|
||||
---
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:h2:~/client_heartbeat;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE;DATABASE_TO_UPPER=true;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
|
||||
username: sa
|
||||
driver-class-name: org.h2.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/wu_lazy_cloud_heartbeat_client_start?allowMultiQueries=true&useUnicode=true&autoReconnect=true&useAffectedRows=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&databaseTerm=SCHEMA
|
||||
username: root
|
||||
password: wujiawei
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
@ -30,7 +30,7 @@ docker push registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-se
|
||||
|
||||
|
||||
```RUN
|
||||
docker run -d -it -p 6001:6001 -p 7001:7001 -e spring.profiles.active=prod -e MAIN_DB_HOST=localhost:3306 -e MAIN_DB_PASSWORD=root -e MAIN_DB_PASSWORD=root --name wu-lazy-cloud-heartbeat-server-start registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server-start:1.3.0-JDK17-NATIVE-SNAPSHOT
|
||||
docker run -d -it -p 6001:6001 -p 7001:7001 -e spring.profiles.active=prod -e MAIN_DB_HOST=localhost:3306 -e MAIN_DB_PASSWORD=root -e MAIN_DB_PASSWORD=root --name wu-lazy-cloud-heartbeat-server-start registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server-start:1.3.0-JDK17-SNAPSHOT
|
||||
|
||||
http://127.0.0.1:6001/swagger-ui/index.html
|
||||
|
||||
|
@ -7,7 +7,7 @@ metadata:
|
||||
k8s.kuboard.cn/layer: gateway
|
||||
k8s.kuboard.cn/name: wu-lazy-cloud-heartbeat-server
|
||||
name: wu-lazy-cloud-heartbeat-server
|
||||
namespace: default
|
||||
namespace: infrastructure-construction
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
@ -31,7 +31,7 @@ spec:
|
||||
- env:
|
||||
- name: spring.datasource.url
|
||||
value: >-
|
||||
jdbc:mysql://cloud-mysql:3306/wu_lazy_cloud_netty_server?allowMultiQueries=true&useUnicode=true&autoReconnect=true&useAffectedRows=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&databaseTerm=SCHEMA
|
||||
jdbc:mysql://cloud-mysql:3306/net_infrastructure_construction?allowMultiQueries=true&useUnicode=true&autoReconnect=true&useAffectedRows=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&databaseTerm=SCHEMA
|
||||
- name: JAVA_OPTS
|
||||
value: '-Xms64m -Xmx128m'
|
||||
- name: spring.datasource.username
|
||||
@ -41,7 +41,7 @@ spec:
|
||||
- name: spring.datasource.driver-class-name
|
||||
value: com.mysql.cj.jdbc.Driver
|
||||
image: >-
|
||||
registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server-start:1.2.7-JDK17-NATIVE-SNAPSHOT
|
||||
registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server-start:1.3.0-JDK17-SNAPSHOT
|
||||
imagePullPolicy: Always
|
||||
name: wu-lazy-cloud-heartbeat-server
|
||||
resources: {}
|
||||
@ -63,11 +63,11 @@ metadata:
|
||||
k8s.kuboard.cn/layer: gateway
|
||||
k8s.kuboard.cn/name: wu-lazy-cloud-heartbeat-server
|
||||
name: wu-lazy-cloud-heartbeat-server
|
||||
namespace: default
|
||||
namespace: infrastructure-construction
|
||||
spec:
|
||||
ports:
|
||||
- name: pecjjh
|
||||
nodePort: 30676
|
||||
nodePort: 30560
|
||||
port: 7001
|
||||
protocol: TCP
|
||||
targetPort: 7001
|
||||
@ -77,7 +77,7 @@ spec:
|
||||
protocol: TCP
|
||||
targetPort: 30273
|
||||
- name: wfcigf
|
||||
nodePort: 30576
|
||||
nodePort: 30550
|
||||
port: 6001
|
||||
protocol: TCP
|
||||
targetPort: 6001
|
||||
|
Reference in New Issue
Block a user