Java 类org.springframework.boot.ResourceBanner 实例源码

项目:sshd-shell-spring-boot    文件:ShellBanner.java   
@PostConstruct
void init() {
    ResourceLoader resourceLoader = new DefaultResourceLoader();
    String location = environment.getProperty("banner.image.location");
    if (StringUtils.hasLength(location)) {
        addBanner(resourceLoader, location, resource -> new ImageBanner(resource));
    } else {
        for (String ext : SUPPORTED_IMAGES) {
            addBanner(resourceLoader, "banner." + ext, resource -> new ImageBanner(resource));
        }
    }
    addBanner(resourceLoader, environment.getProperty("banner.location", "banner.txt"),
            resource -> new ResourceBanner(resource));
}
项目:iiif-server-hymir    文件:Application.java   
private static Banner hymirBanner() {
  Resource resource = new ClassPathResource("banner.txt");
  return new ResourceBanner(resource);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteSpringApplication.java   
private Banner getBanner() {
    ClassPathResource banner = new ClassPathResource("remote-banner.txt",
            RemoteSpringApplication.class);
    return new ResourceBanner(banner);
}
项目:spring-boot-concourse    文件:RemoteSpringApplication.java   
private Banner getBanner() {
    ClassPathResource banner = new ClassPathResource("remote-banner.txt",
            RemoteSpringApplication.class);
    return new ResourceBanner(banner);
}
项目:contestparser    文件:RemoteSpringApplication.java   
private Banner getBanner() {
    ClassPathResource banner = new ClassPathResource("remote-banner.txt",
            RemoteSpringApplication.class);
    return new ResourceBanner(banner);
}