Update dependencies and enable Feign client
This commit is contained in:
@@ -2,9 +2,11 @@ package com.olympus.hermione;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@SpringBootApplication
|
||||
@SpringBootApplication(scanBasePackages = {"com.olympus.hermione", "com.olympus"})
|
||||
@EnableFeignClients(basePackages = "com.olympus.feign")
|
||||
@EnableAsync
|
||||
public class HermioneApplication {
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.olympus.hermione.controllers;
|
||||
|
||||
import com.olympus.dto.TreeNode;
|
||||
import com.olympus.feign.SourceCodeModule;
|
||||
import com.olympus.hermione.services.SourceCodeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
|
||||
@RestController
|
||||
public class ApplicationBrowserController {
|
||||
|
||||
@Autowired
|
||||
SourceCodeService sourceCodeService;
|
||||
|
||||
@GetMapping
|
||||
public TreeNode getApplicationNode(String applicationName){
|
||||
return sourceCodeService.getApplicationNode(applicationName);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.olympus.hermione.services;
|
||||
|
||||
import com.olympus.dto.TreeNode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.olympus.feign.SourceCodeModule;
|
||||
|
||||
@Service
|
||||
public class SourceCodeService {
|
||||
|
||||
@Autowired
|
||||
private SourceCodeModule sourceCodeModule;
|
||||
|
||||
public TreeNode getApplicationNode(String applicationName) {
|
||||
return sourceCodeModule.getTreeFromNode(applicationName,"application");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user