Search in sources :

Example 1 with MicronautBanner

use of io.micronaut.context.banner.MicronautBanner in project micronaut-core by micronaut-projects.

the class Micronaut method printBanner.

private void printBanner() {
    if (!isBannerEnabled()) {
        return;
    }
    PrintStream out = System.out;
    Optional<URL> resource = getResourceLoader().getResource(BANNER_NAME);
    if (resource.isPresent()) {
        new ResourceBanner(resource.get(), out).print();
    } else {
        new MicronautBanner(out).print();
    }
}
Also used : PrintStream(java.io.PrintStream) MicronautBanner(io.micronaut.context.banner.MicronautBanner) ResourceBanner(io.micronaut.context.banner.ResourceBanner) URL(java.net.URL)

Aggregations

MicronautBanner (io.micronaut.context.banner.MicronautBanner)1 ResourceBanner (io.micronaut.context.banner.ResourceBanner)1 PrintStream (java.io.PrintStream)1 URL (java.net.URL)1