Skip to content

Commit

Permalink
[type:fix] SpringCloudParser MetaData null data. (#5737)
Browse files Browse the repository at this point in the history
* [type:fix] SpringCloudParser MetaData null data.

* [type:fix] SpringCloudParser MetaData null data.

* [type:fix] cli.

---------

Co-authored-by: aias00 <[email protected]>
Co-authored-by: aias00 <[email protected]>
  • Loading branch information
3 people authored Nov 11, 2024
1 parent ab87238 commit eb176ed
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -383,8 +382,7 @@ private IngressConfiguration getSpringCloudRouteConfig(final Map<String, String>
LOG.error("spring cloud metadata is error, please check spring cloud service. annotations: [{}]", annotations);
throw new ShenyuException(annotations + " is is missing.");
}
MetaData metaData = new MetaData();
MetaData.builder()
MetaData metaData = MetaData.builder()
.appName(annotations.get(IngressConstants.PLUGIN_SPRING_CLOUD_APP_NAME))
.path(annotations.get(IngressConstants.PLUGIN_SPRING_CLOUD_PATH))
.rpcType(annotations.get(IngressConstants.PLUGIN_SPRING_CLOUD_RPC_TYPE))
Expand All @@ -394,6 +392,6 @@ private IngressConfiguration getSpringCloudRouteConfig(final Map<String, String>
.parameterTypes(annotations.getOrDefault(IngressConstants.PLUGIN_SPRING_CLOUD_PARAMENT_TYPE, ""))
.enabled(true)
.build();
return new IngressConfiguration(selectorData, Arrays.asList(ruleData), Arrays.asList(metaData));
return new IngressConfiguration(selectorData, Collections.singletonList(ruleData), Collections.singletonList(metaData));
}
}

0 comments on commit eb176ed

Please sign in to comment.