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

handlebars.JavaMicronaut.homeController.mustache Maven / Gradle / Ivy

There is a newer version: 1.0.54
Show newest version
package {{configPackage}};

import io.micronaut.http.HttpResponse;
import io.micronaut.http.HttpStatus;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.net.URI;

/**
 * Home redirection to swagger api documentation
 */
@Controller
public class HomeController {

    private static final Logger LOGGER = LoggerFactory.getLogger(HomeController.class);

    @Get
    public HttpResponse index() {
        LOGGER.debug("swagger-ui.html");
        return HttpResponse.status(HttpStatus.FOUND).headers((headers) ->
                headers.location(URI.create("swagger-ui.html")));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy