Refactor TestController to use ResponseEntity<Object> in RevEngApplication method
This commit is contained in:
@@ -122,7 +122,7 @@ public class TestController {
|
||||
}
|
||||
|
||||
@PostMapping("/revenginnerapplication")
|
||||
public ResponseEntity<String> RevEngApplication(@RequestBody ApolloParseRequestDTO apolloParseRequestDTO){
|
||||
public ResponseEntity<Object> RevEngApplication(@RequestBody ApolloParseRequestDTO apolloParseRequestDTO){
|
||||
reModuleService.callReverseEngModules(apolloParseRequestDTO);
|
||||
return ResponseEntity.accepted().body("Request to reverse engineering application is being processed");
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.olympus.dto.CommonReverseEngRequest;
|
||||
import com.olympus.feign.JavaREModule;
|
||||
import com.olympus.model.apollo.KSGitInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Optional;
|
||||
@@ -35,12 +36,13 @@ public class REModuleService {
|
||||
gitInfo.getCodeTypes().forEach(codeType -> {
|
||||
if(codeType.getType().equalsIgnoreCase("java")){
|
||||
commonReverseEngRequest.setApplicationType(codeType.getType());
|
||||
CompletableFuture.completedFuture(javaREModule.revApplication(commonReverseEngRequest));
|
||||
System.out.println("value is :"+javaREModule.revApplication(commonReverseEngRequest));
|
||||
}
|
||||
if(codeType.getType().equalsIgnoreCase("jsp")) {
|
||||
System.out.println("JSP Parser Module");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ server:
|
||||
apollo:
|
||||
fe:
|
||||
url: "http://localhost:5173"
|
||||
java-parser-module:
|
||||
url: "http://java-parser-module-service.olympus.svc.cluster.local:8080"
|
||||
spring:
|
||||
application:
|
||||
name: apollo
|
||||
|
||||
Reference in New Issue
Block a user