未验证 提交 66aa8f3a 编写于 作者: P Phodal Huang

fix: fix base path lose issue

上级 bd15504d
......@@ -187,7 +187,6 @@ func (s *JavaCallListener) EnterAnnotation(ctx *AnnotationContext) {
isSpringRestController = true
}
if !hasEnterClass {
if annotationName == "RequestMapping" {
if ctx.ElementValuePairs() != nil {
......@@ -206,14 +205,15 @@ func (s *JavaCallListener) EnterAnnotation(ctx *AnnotationContext) {
}
uri := ""
if ctx.ElementValuePairs() != nil {
firstPair := ctx.ElementValuePairs().GetChild(0).(*ElementValuePairContext)
if firstPair.IDENTIFIER().GetText() == "value" {
uri = baseApiUrlName + firstPair.ElementValue().GetText()
}
if ctx.ElementValue() != nil {
uri = baseApiUrlName + ctx.ElementValue().GetText()
} else {
uri = baseApiUrlName
}
restApi := &RestApi{uri, "", "", nil}
uriRemoveQuote := strings.ReplaceAll(uri, "\"", "")
restApi := &RestApi{uriRemoveQuote, "", "", nil}
if hasEnterClass {
switch annotationName {
case "GetMapping":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册