package gaf3.core.services

import gaf3.core.cloud.GafCloudConfiguration
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.context.annotation.Import
import org.springframework.data.jpa.repository.config.EnableJpaRepositories
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@SpringBootApplication
@Import(GafCloudConfiguration::class)
@EnableJpaRepositories(basePackages=["gaf3.core.services"])
@RestController
class GafServicesApplication {

	@RequestMapping("/all/hello")
	fun hello(name: String?) : String {
		return """ hello, ${name ?: "all"}!"""
	}
}

fun main(args: Array<String>) {
	runApplication<GafServicesApplication>(*args)
}
