Skip to content

[Bug] @RequestMapping의 method 속성이 파싱되지 않음 #33

@KBroJ

Description

@KBroJ

문제

@RequestMapping(method=RequestMethod.POST)[ALL]로 표시됨

원인

extractHttpMethod()가 어노테이션 이름만 확인하고 method 속성은 파싱하지 않음

// JavaSourceParser.java:519-525
private String extractHttpMethod(String annotationName) {
    if (annotationName.equals("GetMapping")) return "GET";
    if (annotationName.equals("PostMapping")) return "POST";
    return "ALL";  // @RequestMapping은 무조건 ALL
}

해결 방안

  • @RequestMapping일 때 NormalAnnotationExpr에서 method 속성 확인
  • RequestMethod.GET → "GET" 변환 로직 추가
  • 복수 메서드 {GET, POST} → "GET/POST" 처리

관련 파일

  • src/main/java/com/codeflow/parser/JavaSourceParser.java

참고

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions