Skip to content

Commit

Permalink
add welcome msg
Browse files Browse the repository at this point in the history
  • Loading branch information
gy2006 committed Aug 7, 2021
1 parent c9af6ff commit d0dd8d3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions core/src/main/java/com/flowci/core/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,34 @@

package com.flowci.core;

import com.flowci.util.StringHelper;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;

import java.io.IOException;

/**
* @author yang
*/
@Log4j2
@SpringBootApplication
public class Application {

@Autowired
private ResourceLoader resourceLoader;

@EventListener(ContextRefreshedEvent.class)
public void printBanner() throws IOException {
Resource r = resourceLoader.getResource("classpath:welcome.txt");
log.info(StringHelper.toString(r.getInputStream()));
}

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
Expand Down
7 changes: 7 additions & 0 deletions core/src/main/resources/welcome.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

_ _ __ _ _
__ __ ___ | | ___ ___ _ __ ___ ___ | |_ ___ / _|| | ___ __ __ ___ (_)
\ \ /\ / / / _ \| | / __| / _ \ | '_ ` _ \ / _ \ | __| / _ \ | |_ | | / _ \ \ \ /\ / / / __|| |
\ V V / | __/| || (__ | (_) || | | | | || __/ | |_ | (_) | | _|| || (_) | \ V V / _ | (__ | |
\_/\_/ \___||_| \___| \___/ |_| |_| |_| \___| \__| \___/ |_| |_| \___/ \_/\_/ (_) \___||_|

0 comments on commit d0dd8d3

Please sign in to comment.