feat: custom banner
This commit is contained in:
30
build.gradle
30
build.gradle
@@ -1,5 +1,4 @@
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'eclipse'
|
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
|
|
||||||
def JsonSlurper = Class.forName('groovy.json.JsonSlurper');
|
def JsonSlurper = Class.forName('groovy.json.JsonSlurper');
|
||||||
@@ -8,9 +7,6 @@ def buildJSON = JsonSlurper.newInstance().parseText(new File("build.json").text)
|
|||||||
if (buildJSON.application) { apply plugin: 'application' }
|
if (buildJSON.application) { apply plugin: 'application' }
|
||||||
|
|
||||||
def baseProjectName = buildJSON?.project?.name ?: '__project_name__';
|
def baseProjectName = buildJSON?.project?.name ?: '__project_name__';
|
||||||
def shellCommandName = baseProjectName
|
|
||||||
def eclipseProjectName = baseProjectName
|
|
||||||
def eclipseProjectComment = buildJSON?.project?.comment ?: '__project_name_comment__'
|
|
||||||
def jarManifestMainClass = buildJSON?.project?.main ?: 'SampleMain'
|
def jarManifestMainClass = buildJSON?.project?.main ?: 'SampleMain'
|
||||||
|
|
||||||
if (buildJSON.application) { mainClassName = jarManifestMainClass }
|
if (buildJSON.application) { mainClassName = jarManifestMainClass }
|
||||||
@@ -64,29 +60,3 @@ dependencies {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eclipse {
|
|
||||||
project {
|
|
||||||
name = eclipseProjectName
|
|
||||||
comment = eclipseProjectComment
|
|
||||||
}
|
|
||||||
classpath {
|
|
||||||
defaultOutputDir = file('classes')
|
|
||||||
downloadSources = true
|
|
||||||
file {
|
|
||||||
whenMerged { classpath ->
|
|
||||||
classpath.entries.findAll { it.kind=='lib' }.each {
|
|
||||||
if ((it.path != null) && (it.sourcePath == null) && file(it.path.replace(".jar", "-sources.jar")).exists()) {
|
|
||||||
it.sourcePath = getFileReferenceFactory().fromPath(it.path.replace(".jar", "-sources.jar"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
eclipseJdt << {
|
|
||||||
File f = file('.settings/org.eclipse.core.resources.prefs')
|
|
||||||
f.write('eclipse.preferences.version=1\n')
|
|
||||||
f.append('encoding/<project>=utf-8')
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,2 +1,7 @@
|
|||||||
|
application.name=SpringBoot Sample
|
||||||
|
application.version=0.0.1
|
||||||
|
application.title=This is SpringBoot sample application
|
||||||
spring.mvc.throw-exception-if-no-handler-found=true
|
spring.mvc.throw-exception-if-no-handler-found=true
|
||||||
spring.resources.add-mappings=false
|
spring.resources.add-mappings=false
|
||||||
|
banner.location=custom-banner.txt
|
||||||
|
spring.output.ansi.enabled=always
|
||||||
|
|||||||
16
src/main/resources/custom-banner.txt
Normal file
16
src/main/resources/custom-banner.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
${Ansi.YELLOW}> ******************************************************************
|
||||||
|
${Ansi.YELLOW}> ${Ansi.RED} .d88888b dP
|
||||||
|
${Ansi.YELLOW}> ${Ansi.RED} 88. "' 88
|
||||||
|
${Ansi.YELLOW}> ${Ansi.RED} `Y88888b. .d8888b. 88d8b.d8b. 88d888b. 88 .d8888b.
|
||||||
|
${Ansi.YELLOW}> ${Ansi.RED} `8b 88' `88 88'`88'`88 88' `88 88 88ooood8
|
||||||
|
${Ansi.YELLOW}> ${Ansi.RED} d8' .8P 88. .88 88 88 88 88. .88 88 88. ...
|
||||||
|
${Ansi.YELLOW}> ${Ansi.RED} Y88888P `88888P8 dP dP dP 88Y888P' dP `88888P'
|
||||||
|
${Ansi.YELLOW}> ${Ansi.RED} 88
|
||||||
|
${Ansi.YELLOW}> ${Ansi.RED} dP
|
||||||
|
${Ansi.YELLOW}>
|
||||||
|
${Ansi.YELLOW}> ${Ansi.GREEN}Application : ${application.name}
|
||||||
|
${Ansi.YELLOW}> ${Ansi.GREEN}Application Version : ${application.version}
|
||||||
|
${Ansi.YELLOW}> ${Ansi.GREEN}Application Title : ${application.title}
|
||||||
|
${Ansi.YELLOW}> ${Ansi.GREEN}Spring Boot Version : ${spring-boot.version}
|
||||||
|
${Ansi.YELLOW}>
|
||||||
|
${Ansi.YELLOW}> ******************************************************************
|
||||||
Reference in New Issue
Block a user