Skip to content

Commit

Permalink
http metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
yu199195 committed Sep 25, 2020
1 parent e89bafa commit 053d890
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

package org.dromara.soul.plugin.global;

import java.time.LocalDateTime;
import java.util.Objects;
import java.util.Optional;
import org.apache.commons.lang3.StringUtils;
import org.dromara.soul.common.constant.Constants;
import org.dromara.soul.common.dto.MetaData;
Expand All @@ -27,10 +30,6 @@
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.web.server.ServerWebExchange;

import java.time.LocalDateTime;
import java.util.Objects;
import java.util.Optional;

/**
* The type Default soul context builder.
*
Expand Down Expand Up @@ -66,8 +65,11 @@ private SoulContext transform(final ServerHttpRequest request, final MetaData me
if (RpcTypeEnum.SPRING_CLOUD.getName().equals(metaData.getRpcType())) {
setSoulContextByHttp(soulContext, path);
soulContext.setRpcType(metaData.getRpcType());
} else {
} else if (RpcTypeEnum.DUBBO.getName().equals(metaData.getRpcType())) {
setSoulContextByDubbo(soulContext, metaData);
} else {
setSoulContextByHttp(soulContext, path);
soulContext.setRpcType(RpcTypeEnum.HTTP.getName());
}
} else {
setSoulContextByHttp(soulContext, path);
Expand Down
2 changes: 1 addition & 1 deletion soul-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<version>2.2.2.RELEASE</version>
</parent>
<properties>
<soul.version>2.2.1-SNAPSHOT</soul.version>
<soul.version>2.2.1</soul.version>
</properties>

<modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class OrderController {
* @return the order dto
*/
@PostMapping("/save")
@SoulSpringMvcClient(path = "/save" , desc = "订单保存", registerMetaData = true)
@SoulSpringMvcClient(path = "/save" , desc = "订单保存")
public OrderDTO save(@RequestBody final OrderDTO orderDTO) {
orderDTO.setName("hello world save order");
return orderDTO;
Expand All @@ -58,7 +58,7 @@ public OrderDTO save(@RequestBody final OrderDTO orderDTO) {
* @return the order dto
*/
@GetMapping("/findById")
@SoulSpringMvcClient(path = "/findById", desc = "根据id获取", registerMetaData = true)
@SoulSpringMvcClient(path = "/findById", desc = "根据id获取")
public OrderDTO findById(@RequestParam("id") final String id) {
OrderDTO orderDTO = new OrderDTO();
orderDTO.setId(id);
Expand Down

0 comments on commit 053d890

Please sign in to comment.