Last active
August 29, 2015 14:17
-
-
Save nobeans/af379bba65660e2fcb3f to your computer and use it in GitHub Desktop.
Banner in Grails 3.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Application extends GrailsAutoConfiguration { | |
static void main(String[] args) { | |
def app = new GrailsApp(Application) | |
// インラインでロゴ文字列を指定できる | |
// クラスパスにbanner.txtがある場合はそちらが優先して使われる(grails-app/conf/banner.txt)。 | |
app.setBanner { org.springframework.core.env.Environment environment, Class<?> sourceClass, PrintStream out -> | |
out.println ">" * 100 | |
out.println "My Banner!" | |
out.println "Env: ${environment.dump()}" | |
out.println "Source class: ${sourceClass}" | |
out.println "<" * 100 | |
} | |
println app.dump() | |
app.run() | |
} | |
} |
Author
nobeans
commented
Mar 17, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment