Skip to content

Commit

Permalink
fix docean cross domain #838 (#839)
Browse files Browse the repository at this point in the history
* fix docean cross domain #838

* fix redis mget
  • Loading branch information
shanwb committed May 10, 2024
1 parent 3705969 commit e466541
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public MvcRunnable(Mvc mvc, HttpServerConfig config, ChannelHandlerContext ctx,
this.context.setHeaders(this.request.getHeaders());
this.context.setVirtualThread(mvc.getMvcConfig().isVirtualThread());
this.context.setPath(path);
this.context.setAllowCross(mvc.getMvcConfig().isAllowCross());
this.request.setMethod(method);
this.request.setPath(path);
this.request.setBody(body);
Expand Down
16 changes: 15 additions & 1 deletion jcommon/redis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<version>1.6.0-jdk21-SNAPSHOT</version>
</parent>
<artifactId>redis</artifactId>
<version>2.0-jdk20-SNAPSHOT</version>
<version>2.0-jdk21-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
Expand Down Expand Up @@ -37,4 +37,18 @@
<version>3.8.1</version>
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>central</id>
<name>maven-release-virtual</name>
<url>https://pkgs.d.xiaomi.net/artifactory/maven-release-virtual</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>maven-snapshot-virtual</name>
<url>https://pkgs.d.xiaomi.net/artifactory/maven-snapshot-virtual</url>
</snapshotRepository>
</distributionManagement>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ public String get(String key) {
}

public Map<String, String> mget(final List<String> keys) {
boolean success = true;
try {
if (serverType.equals("dev")) {
Map<String, String> result = new HashMap<>();
Expand All @@ -224,7 +223,6 @@ public Map<String, String> mget(final List<String> keys) {
return cluster.mget(keys);
}
} catch (Exception e) {
success = false;
throw e;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ private Map<JedisPool, List<String>> getPoolKeyMap(List<String> keys) {
Map<JedisPool, List<String>> poolKeysMap = new LinkedHashMap<JedisPool, List<String>>();
try {
Field field = JedisClusterConnectionHandler.class.getDeclaredField("cache");
field.setAccessible(true);
for (String key : keys) {
JedisPool jedisPool;
int slot = JedisClusterCRC16.getSlot(key);
Expand Down

0 comments on commit e466541

Please sign in to comment.