Skip to content

Commit de31f59

Browse files
committed
1.2.2 snapshot
fix cached uid block error!
1 parent 7852a05 commit de31f59

File tree

18 files changed

+82
-65
lines changed

18 files changed

+82
-65
lines changed

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.cooperlyt</groupId>
88
<artifactId>uid-reactive-generator-spring</artifactId>
9-
<version>1.2.1</version>
9+
<version>1.2.2-snapshot</version>
1010
</parent>
1111

1212
<artifactId>example</artifactId>
@@ -82,7 +82,7 @@
8282
<dependency>
8383
<groupId>io.github.cooperlyt</groupId>
8484
<artifactId>uid-reactive-generator-db-spring-boot-starter</artifactId>
85-
<version>1.2.1</version>
85+
<version>1.2.2-snapshot</version>
8686
</dependency>
8787

8888
<!-- jdbc -->

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.cooperlyt</groupId>
88
<artifactId>uid-reactive-generator-spring</artifactId>
9-
<version>1.2.1</version>
9+
<version>1.2.2-snapshot</version>
1010
<packaging>pom</packaging>
1111

1212
<name>uid-reactive-generator-spring</name>
@@ -65,7 +65,7 @@
6565
<dependency>
6666
<groupId>org.springframework.boot</groupId>
6767
<artifactId>spring-boot-dependencies</artifactId>
68-
<version>3.0.3</version>
68+
<version>3.1.4</version>
6969
<type>pom</type>
7070
<scope>import</scope>
7171
</dependency>

uid-reactive-generator-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.cooperlyt</groupId>
88
<artifactId>uid-reactive-generator-spring</artifactId>
9-
<version>1.2.1</version>
9+
<version>1.2.2-snapshot</version>
1010
</parent>
1111

1212
<artifactId>uid-reactive-generator-api</artifactId>

uid-reactive-generator-db-spring-boot-starter/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.cooperlyt</groupId>
88
<artifactId>uid-reactive-generator-spring</artifactId>
9-
<version>1.2.1</version>
9+
<version>1.2.2-snapshot</version>
1010
</parent>
1111

1212
<artifactId>uid-reactive-generator-db-spring-boot-starter</artifactId>
@@ -15,7 +15,7 @@
1515
<dependency>
1616
<groupId>io.github.cooperlyt</groupId>
1717
<artifactId>uid-reactive-generator-spring-boot-starter</artifactId>
18-
<version>1.2.1</version>
18+
<version>1.2.2-snapshot</version>
1919
</dependency>
2020

2121
<dependency>

uid-reactive-generator-db-spring-boot-starter/src/main/java/io/github/cooperlyt/cloud/uid/worker/jpa/R2DBCWorkerIdAssigner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public R2DBCWorkerIdAssigner(WorkerNodeIdent workerNodeIdent,
2424

2525
@Transactional(rollbackFor = Exception.class)
2626
@Override
27-
protected Mono<Long> assignWorkerId(WorkerNodeIdent workerNodeIdent) {
27+
public Mono<Long> assignWorkerId(WorkerNodeIdent workerNodeIdent) {
2828
return workerNodeRepository
2929
.getWorkerNodeByHostAndPort(workerNodeIdent.getHost(),workerNodeIdent.getPort())
3030
.map(Optional::of)

uid-reactive-generator-spring-boot-starter/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.cooperlyt</groupId>
88
<artifactId>uid-reactive-generator-spring</artifactId>
9-
<version>1.2.1</version>
9+
<version>1.2.2-snapshot</version>
1010
</parent>
1111

1212
<artifactId>uid-reactive-generator-spring-boot-starter</artifactId>
@@ -21,7 +21,7 @@
2121
<dependency>
2222
<groupId>io.github.cooperlyt</groupId>
2323
<artifactId>uid-reactive-generator</artifactId>
24-
<version>1.2.1</version>
24+
<version>1.2.2-snapshot</version>
2525
</dependency>
2626

2727

uid-reactive-generator-spring-cloud-starter-discovery/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.cooperlyt</groupId>
88
<artifactId>uid-reactive-generator-spring</artifactId>
9-
<version>1.2.1</version>
9+
<version>1.2.2-snapshot</version>
1010
</parent>
1111

1212
<artifactId>uid-reactive-generator-spring-cloud-starter-discovery</artifactId>
@@ -16,7 +16,7 @@
1616
<dependency>
1717
<groupId>io.github.cooperlyt</groupId>
1818
<artifactId>uid-reactive-generator-spring-boot-starter</artifactId>
19-
<version>1.2.1</version>
19+
<version>1.2.2-snapshot</version>
2020
</dependency>
2121

2222
<dependency>

uid-reactive-generator-spring-cloud-starter-discovery/src/main/java/io/github/cooperlyt/cloud/uid/worker/DiscoveryWorkerIdAssigner.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public void onRegisteredEvent(InstanceRegisteredEvent<?> event){
5151
sink.tryEmitValue(event).orThrow();
5252
}
5353

54+
5455
@EventListener
5556
public void onPreRegisteredEvent(InstancePreRegisteredEvent event) {
5657

@@ -59,6 +60,7 @@ public void onPreRegisteredEvent(InstancePreRegisteredEvent event) {
5960
prepareWorkerId = discoveryClientAdapter.getInstances(serverId)
6061
.filter(instance -> !instance.getInstanceId().equals(instanceId))
6162
.map(this::getOrder)
63+
6264
.reduce(0L,(max,order) -> (order > max) ? order : max)
6365
.blockOptional().orElse(0L) + 1L;
6466

uid-reactive-generator-spring-cloud-starter-discovery/src/main/java/io/github/cooperlyt/cloud/uid/worker/WorkerIdAssignerAutoConfigure.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import io.github.cooperlyt.cloud.uid.worker.client.DiscoveryClientAdapter;
44
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
5+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
56
import org.springframework.cloud.client.ConditionalOnDiscoveryEnabled;
67
import org.springframework.context.annotation.Bean;
78
import org.springframework.context.annotation.Configuration;
@@ -14,6 +15,7 @@ public class WorkerIdAssignerAutoConfigure {
1415
@Bean
1516
@Lazy
1617
@ConditionalOnMissingBean
18+
// @ConditionalOnProperty(prefix = "spring.cloud.service-registry.auto-registration", name = "enabled")
1719
public WorkerIdAssigner workerIdAssigner(DiscoveryClientAdapter discoveryClientAdapter){
1820
return new DiscoveryWorkerIdAssigner(discoveryClientAdapter);
1921
}

0 commit comments

Comments
 (0)