All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.infusers.core.eng.selfheal.SelfHealController Maven / Gradle / Ivy

The newest version!
package com.infusers.core.eng.selfheal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.infusers.core.eng.selfheal.deployment.CloudProviderService;

@RestController
@RequestMapping("api/v1/infuser")
public class SelfHealController {		
	@Autowired(required = true)
	private SelfHealService apiService;

	@Autowired(required = true)
	private CloudProviderService cloudProviderService;
	
    @GetMapping("/cloud-provider")
    public ResponseEntity getCloudProvider() {    	
        return cloudProviderService.getCloudProvider();
    }	

	@GetMapping("/version")
	public ResponseEntity getVersion() {
		return apiService.getVersion();
	}
	
	@GetMapping("/audit-spring-boot-dependencies")
	public ResponseEntity auditSpringBootDependencies(
			@RequestParam(defaultValue = "false", required = false) boolean recursive
			) 
	{		
        return apiService.auditSpringBootDependencies(recursive);
	}
}